PHP code example of figuren-theater / phpstan
1. Go to this page and download the library: Download figuren-theater/phpstan library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
figuren-theater / phpstan example snippets
neon
#$ vendor/bin/phpstan analyze
includes:
# Already included
# @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
# Include this extension, if not already autoloaded via composer
# - vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: max
inferPrivatePropertyTypeFromConstructor: true
bootstrapFiles:
# Missing constants, function and class stubs
# - %currentWorkingDirectory%/tests/phpstan/bootstrap.php
# - %currentWorkingDirectory%/tests/static-analysis-stubs/wordpress-defines.stub
# - %currentWorkingDirectory%/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
# scanFiles:
# Plugin stubs
# - %currentWorkingDirectory%/tests/phpstan/PLUGIN-stubs.php
# Procedural code
# - %currentWorkingDirectory%/myplugin-functions.php
# autoload_directories:
# - %currentWorkingDirectory%/inc/
paths:
- %currentWorkingDirectory%/plugin.php
- %currentWorkingDirectory%/inc/
# - %currentWorkingDirectory%/templates/
excludePaths:
- %currentWorkingDirectory%/vendor/
ignoreErrors:
# Uses func_get_args()
# - '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2