-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathphpstan.neon
More file actions
81 lines (81 loc) · 3.91 KB
/
phpstan.neon
File metadata and controls
81 lines (81 loc) · 3.91 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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/breakdance.php
- tests/phpstan/stubs/bricks.php
- tests/phpstan/stubs/buddyboss.php
- tests/phpstan/stubs/divi.php
- tests/phpstan/stubs/elementor.php
- tests/phpstan/stubs/elementorpro.php
- tests/phpstan/stubs/flatsome.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/profilepress.php
- tests/phpstan/stubs/surecart.php
- tests/phpstan/stubs/ultimate-member.php
- tests/phpstan/stubs/wlpr.php
- tests/phpstan/stubs/woocommerce.php
- tests/phpstan/stubs/woorewards.php
- tests/phpstan/stubs/wp-loyalty-rules.php
- tests/phpstan/stubs/wpbakery.php
- helpers.php
- autoload.php
ignoreErrors:
-
identifier: function.internal
-
identifier: method.internal
-
identifier: missingType.iterableValue
-
identifier: missingType.generics
-
identifier: staticMethod.internal
# These are ArrayObject classes
- '#Access to an undefined property WP_|GeminiLabs\\SiteReviews\\(Arguments|Request|Review)::(.+)#'
- '#Access to an undefined property GeminiLabs\\SiteReviews\\Contracts\\(Field|Plugin|Shortcode)Contract::(.+)#'
- '#Access to an undefined property GeminiLabs\\SiteReviews\\Database\\NormalizePaginationArgs::(.+)#'
- '#Access to an undefined property GeminiLabs\\SiteReviews\\Modules\\Html\\(Field|FieldCondition|(Metabox|Review|Setting)Field)::(.+)#'
- '#Access to an undefined property \$this\(GeminiLabs\\SiteReviews\\Modules\\Html\\(Field|(Metabox|Review|Setting)Field)\)::(.+)#'
# 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\(\).#'
# This is probably due to incorrect phpdocs in the Elementor stubs
- '#Call to method (get_elements_data|is_built_with_elementor)\(\) on an unknown class Elementor\\Core\\Document.#'
# 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\\(.+)#'
# PHPstan errors with array_sum usage
- '#Parameter \#1 \$array of function array_sum expects an array of values castable to number, array(|<mixed>|<mixed, mixed>) given.#'
level: 5
paths:
- assets/breakdance
- config
- plugin
reportUnmatchedIgnoredErrors: false
scanFiles:
- 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
- vendor/php-stubs/wp-cli-stubs/wp-cli-tools-stubs.php
- vendors/woocommerce/action-scheduler/functions.php
treatPhpDocTypesAsCertain: false
universalObjectCratesClasses:
- GeminiLabs\SiteReviews\Arguments
- GeminiLabs\SiteReviews\Modules\Html\Field
- GeminiLabs\SiteReviews\Modules\Html\Form