1
- # Start command: composer update --classmap-authoritative && vendor/bin/phpstan analyze
1
+ #$ composer update --optimize-autoloader
2
+ #$ sed -e 's#^function is_countable(#// &#' -i vendor/giacocorsiglia/wordpress-stubs/wordpress-stubs.php
3
+ #$ vendor/bin/phpstan analyze
2
4
3
5
includes:
4
- # https://github.com/phpstan/phpstan/blob/master/conf/bleedingEdge.neon
5
- # - vendor/phpstan/phpstan/conf/bleedingEdge.neon
6
+ # @see https://github.com/phpstan/phpstan/blob/master/conf/bleedingEdge.neon
7
+ # Regular phpstan installation
8
+ #- vendor/phpstan/phpstan/conf/bleedingEdge.neon
9
+ # PHAR installation
6
10
- phar://phpstan.phar/conf/bleedingEdge.neon
11
+ # Include this extension
7
12
- vendor/szepeviktor/phpstan-wordpress/extension.neon
8
13
parameters:
9
14
level: max
@@ -22,14 +27,15 @@ parameters:
22
27
# - %currentWorkingDirectory%/inc/
23
28
ignoreErrors:
24
29
# Uses func_get_args()
25
- - '#^Function apply_filters invoked with [34567] parameters, 2 required\.$#'
26
- - '#^Function do_action invoked with [3456] parameters, 1-2 required\.$#'
30
+ - '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
31
+ - '#^Function do_action(_ref_array)? invoked with [3456] parameters, 1-2 required\.$#'
27
32
- '#^Function current_user_can invoked with 2 parameters, 1 required\.$#'
28
33
- '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#'
29
- - '#^Function add_theme_support invoked with [2345] parameters, 1 required\.$#'
30
34
- '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#'
35
+ - '#^Function add_post_type_support invoked with [345] parameters, 2 required\.$#'
36
+ - '#^Function ((get|add)_theme_support|current_theme_supports) invoked with [2345] parameters, 1 required\.$#'
31
37
# https://core.trac.wordpress.org/ticket/43304
32
38
- '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/'
33
39
# WP-CLI accepts a class as callable
34
40
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'
35
- # Please consider commenting ignores: issue URL or reason of ignore
41
+ # Please consider commenting ignores: issue URL or reason for ignoring
0 commit comments