forked from WordPress/performance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
59 lines (58 loc) · 1.66 KB
/
phpstan.neon.dist
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
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: 8
treatPhpDocTypesAsCertain: false
paths:
- plugins
- tests
- performance.php
- plugins/performance-lab/load.php
bootstrapFiles:
- tools/phpstan/constants.php
- plugins/performance-lab/load.php
- plugins/webp-uploads/load.php
scanDirectories:
- vendor/wp-phpunit/wp-phpunit/
scanFiles:
# These are needed due config.platform.php being 7.2 in composer.json and wordpress-stubs not including polyfills.
# See <https://github.com/php-stubs/wordpress-stubs/issues/100>.
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_contains.php
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_starts_with.php
stubFiles:
- tools/phpstan/filtered-functions.stub
dynamicConstantNames:
- PERFLAB_OBJECT_CACHE_DROPIN_VERSION
ignoreErrors:
-
# Ignore error related to PHP 8 using a GdImage but PHP 7 using a resource.
message: '/^Parameter .+? of function .+? expects resource, GdImage\|resource given\.$/'
path: plugins/dominant-color-images/*.php
# The following ignored errors are all for tests. They are likely excessively strict and do not warrant being fixed.
-
identifier: argument.type
path: */tests/*
-
identifier: offsetAccess.nonArray
path: */tests/*
-
identifier: method.notFound
path: */tests/*
-
identifier: offsetAccess.notFound
path: */tests/*
-
identifier: encapsedStringPart.nonString
path: */tests/*
-
identifier: offsetAccess.invalidOffset
path: */tests/*
-
identifier: assign.propertyType
path: */tests/*
-
identifier: method.nonObject
path: */tests/*
-
identifier: cast.string
path: */tests/*