-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathphpstan.neon
50 lines (50 loc) · 2.24 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
44
45
46
47
48
49
50
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
bootstrapFiles:
- tests/phpstan/bootstrap.php
- tests/phpstan/stubs/action-scheduler.php
- tests/phpstan/stubs/akismet.php
- tests/phpstan/stubs/buddyboss.php
- tests/phpstan/stubs/elementor.php
- tests/phpstan/stubs/elementorpro.php
- tests/phpstan/stubs/fusion-builder.php
- tests/phpstan/stubs/gamipress.php
- tests/phpstan/stubs/lpfw.php
- tests/phpstan/stubs/mycred.php
- tests/phpstan/stubs/multilingualpress.php
- tests/phpstan/stubs/polylang.php
- tests/phpstan/stubs/ultimate-member.php
- tests/phpstan/stubs/wlpr.php
- tests/phpstan/stubs/woocommerce.php
- tests/phpstan/stubs/woorewards.php
- helpers.php
- autoload.php
ignoreErrors:
-
identifier: missingType.iterableValue
-
identifier: missingType.generics
# These are ArrayObject classes
- '#Access to an undefined property WP_|GeminiLabs\\SiteReviews\\(Arguments|Contracts\\FieldContract|Modules\\Html\\Field|Request)::(.+)#'
# Technically, these errors are correct. However, since this is a third-party package we will ignore them for now
- '#Call to an undefined method ActionScheduler_Schedule::(get_recurrence|get_date)\(\).#'
# get_views() is in the $compat_methods array for public access, leave this for now
- '#Call to protected method get_views\(\) of class WP_Posts_List_Table.#'
# Discrepancies between PHP versions (7.4 - 8)
- '#Parameter \#1 \$separator of function explode expects non-empty-string, string given.#'
# This usage is acceptable in the project
- '#Unsafe usage of new static\(\).#'
# PHPstan has trouble with wp_parse_args|shortcode_atts combined with extract
- '#Variable \$(index|level|levels|seconds|tense|unit) might not be defined.#'
- '#Path in (include|require)_once\(\) "\./wp-(admin|includes)/(.+)\.php" is not a file or it does not exist\.#'
- '#PHPDoc tag @method for method GeminiLabs\\SiteReviews\\Modules\\Schema\\(.+)#'
level: 5
paths:
- config
- plugin
reportUnmatchedIgnoredErrors: false
scanFiles:
- vendors/woocommerce/action-scheduler/functions.php
treatPhpDocTypesAsCertain: false