-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpstan.neon.dist
38 lines (35 loc) · 1.31 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
parameters:
phpVersion: 70200
level: 9
paths:
- Yoast
bootstrapFiles:
- phpunit-bootstrap.php
scanDirectories:
- vendor/wp-coding-standards/wpcs/WordPress
# treatPhpDocTypesAsCertain: false
# reportUnmatchedIgnoredErrors: false
dynamicConstantNames:
- PHP_CODESNIFFER_VERBOSITY
- YOASTCS_ABOVE_THRESHOLD
ignoreErrors:
# Level 4
-
# Bug in PHPStan: PHPStan doesn't seem to like uninitialized properties...
# https://github.com/phpstan/phpstan/issues/10305
message: '`^Property \S+Sniff::\$target_paths \(array<string, string>\) in isset\(\) is not nullable\.$`'
path: Yoast/Sniffs/Files/TestDoublesSniff.php
count: 1
# Level 5
# We're not using strict types, so this will be juggled without any issues.
- '#^Parameter \#3 \$value of method \S+File::recordMetric\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'
# Level 8
# PHPStan (x2) being overzealous: preg_replace() will only return null if an error occured.
-
message: '`^Parameter #1 \$str of function strtolower expects string, string\|null given\.$`'
path: Yoast/Sniffs/Files/FileNameSniff.php
count: 1
-
message: '`^Parameter #2 \$str of function explode expects string, string\|null given\.$`'
path: Yoast/Sniffs/NamingConventions/NamespaceNameSniff.php
count: 1