-
Notifications
You must be signed in to change notification settings - Fork 13
/
phpstan.neon.dist
74 lines (67 loc) · 3.09 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
parameters:
phpVersion: 70100 # Needs to be 70100 or higher... sigh...
level: 9
bootstrapFiles:
- phpstan-bootstrap.php
paths:
# Explicitly not analyzing the tests for this package as, due to the nature
# of this package, it would be too problematic with false positives.
- phpunitpolyfills-autoload.php
- src
excludePaths:
# Triggers "Return type mixed of method * is not covariant with return type void of method *" notices, which cannot be ignored.
# This exclusion can be removed once PHPUnit 8.0 is the minimum supported version
# (and the "drop support for older PHPUnit" task have been executed).
- src/TestCases/TestCasePHPUnitLte7.php
# Triggers "Referencing prefixed PHPUnit class: PHPUnitPHAR\SebastianBergmann\Exporter\Exporter." notices, which cannot be ignored.
- src/Polyfills/AssertClosedResource.php
- src/Polyfills/AssertIgnoringLineEndings.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Level 0
# This is part of the functionality of this library. Ignore.
-
message: '`^Call to an undefined static method Yoast\\PHPUnitPolyfills\\TestCases\\[X]?TestCase::assertInternalType\(\)\.$`'
count: 2
path: src/Polyfills/AssertIsList.php
-
message: '`^Call to an undefined method Yoast\\PHPUnitPolyfills\\TestCases\\[X]?TestCase::expectExceptionMessageRegExp\(\)\.$`'
count: 2
path: src/Polyfills/ExpectUserDeprecation.php
# Level 4
# This is part of the functionality of this package. Safe to ignore.
-
message: "`^Call to function method_exists\\(\\) with 'PHPUnit\\W+Framework\\W+(TestCase|Assert)' and '(assert|expect|equalTo)[^']+' will always evaluate to true\\.$`"
count: 10
path: phpunitpolyfills-autoload.php
-
message: "`^Call to function method_exists\\(\\) with 'PHPUnit\\W+Framework\\W+TestCase' and 'expectDeprecationMe[^']+' will always evaluate to true\\.$`"
count: 4
path: src/Polyfills/ExpectUserDeprecation.php
-
message: "`^Call to function method_exists\\(\\) with 'PHPUnit\\W+Framework\\W+Assert' and 'assertIsArray' will always evaluate to true\\.$`"
count: 2
path: src/Polyfills/AssertIsList.php
-
message: '`^Call to static method PHPUnit\\Framework\\Assert::assertIsArray\(\) with mixed and mixed will always evaluate to false\.$`'
count: 2
path: src/Polyfills/AssertIsList.php
# The traits are functionality, but not used by the package itself. Can't be helped.
-
identifier: trait.unused
path: src/TestListeners/TestListenerDefaultImplementationPHPUnit6.php
-
identifier: trait.unused
path: src/TestListeners/TestListenerSnakeCaseMethods.php
# Level 5
-
# False positive, a string callback is perfectly fine, especially for static methods.
message: "`^Parameter #1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\): void, 'Yoast…' given\\.$`"
count: 1
path: phpunitpolyfills-autoload.php
# Level 9
-
# This is deliberate and the function call is in a try-catch with error silencing.
message: '`^Parameter #1 \$res of function get_resource_type expects resource, mixed given\.$`'
count: 1
path: src/Helpers/ResourceHelper.php