-
Notifications
You must be signed in to change notification settings - Fork 13
/
phpstan.neon.dist
46 lines (42 loc) · 1.91 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
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 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