-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
43 lines (40 loc) · 1.74 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
includes:
- phpstan-baseline.neon
parameters:
level: 9
paths:
- src/
bootstrapFiles:
- dev/phpstan-bootstrap.php
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-i18n-stubs.php
stubFiles:
- dev/wordpress-overrides.stub
dynamicConstantNames:
- CONCATENATE_SCRIPTS
- COMPRESS_SCRIPTS
- COMPRESS_CSS
tmpDir: .phpstan-cache/
reportUnmatchedIgnoredErrors: false
ignoreErrors:
- '#^Function yoast_get_primary_term_id not found.$#'
# Uses func_get_args()
- '#^Function apply_filters invoked with [34567] parameters, 2 required\.$#'
- '#^Function do_action invoked with [3456] parameters, 1-2 required\.$#'
- '#^Function current_user_can invoked with 2 parameters, 1 required\.$#'
- '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#'
- '#^Function add_theme_support invoked with [2345] parameters, 1 required\.$#'
- '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#'
# https://core.trac.wordpress.org/ticket/43304
- '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/'
# WP-CLI accepts a class as callable
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'
- '#PHPDoc tag @throws with type .*? is not subtype of Throwable#'
- '#Function gravity_form not found.#'
- '/^Parameter #1 \$args of function wp_nav_menu expects.* given\.$/'
checkAlwaysTrueStrictComparison: true
# Unfortunately, DocBlocks can't be relied upon in WordPress.
treatPhpDocTypesAsCertain: false