|
1 |
| -#$ composer update --optimize-autoloader |
2 | 1 | #$ vendor/bin/phpstan analyze
|
3 | 2 |
|
4 | 3 | includes:
|
5 |
| - # @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon |
6 |
| - - phar://phpstan.phar/conf/bleedingEdge.neon |
7 |
| - # Include this extension |
8 | 4 | - vendor/szepeviktor/phpstan-wordpress/extension.neon
|
9 | 5 | parameters:
|
10 | 6 | level: max
|
11 | 7 | inferPrivatePropertyTypeFromConstructor: true
|
12 |
| -# bootstrapFiles: |
13 |
| -# # Missing constants, function and class stubs |
14 |
| -# - %currentWorkingDirectory%/tests/phpstan/bootstrap.php |
15 |
| -# scanFiles: |
16 |
| -# # Plugin stubs |
17 |
| -# - %currentWorkingDirectory%/tests/phpstan/PLUGIN-stubs.php |
18 |
| -# # Procedural code |
19 |
| -# - %currentWorkingDirectory%/myplugin-functions.php |
20 |
| -# autoload_directories: |
21 |
| -# - %currentWorkingDirectory%/inc/ |
22 | 8 | paths:
|
23 |
| - - %currentWorkingDirectory%/inc/ |
24 |
| -# excludes_analyse: |
25 |
| -# - %currentWorkingDirectory%/inc/views/ |
| 9 | + - inc/ |
26 | 10 | ignoreErrors:
|
27 | 11 | # Uses func_get_args()
|
28 | 12 | - '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
|
29 |
| - # Fixed in WordPress 5.3 |
30 |
| - #- '#^Function do_action(_ref_array)? invoked with [3456] parameters, 1-2 required\.$#' |
31 |
| - #- '#^Function current_user_can invoked with 2 parameters, 1 required\.$#' |
32 |
| - #- '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#' |
33 |
| - #- '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#' |
34 |
| - #- '#^Function add_post_type_support invoked with [345] parameters, 2 required\.$#' |
35 |
| - #- '#^Function ((get|add)_theme_support|current_theme_supports) invoked with [2345] parameters, 1 required\.$#' |
36 |
| - # https://core.trac.wordpress.org/ticket/43304 |
37 |
| - - '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/' |
38 |
| - # WP-CLI accepts a class as callable |
39 |
| - - '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/' |
40 |
| - # Please consider commenting ignores: issue URL or reason for ignoring |
| 13 | + |
| 14 | +# See full example in phpstan-full.neon |
0 commit comments