-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
phpstan.neon.dist
61 lines (56 loc) · 2.94 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
parameters:
# phpVersion: 50400 # Needs to be 70100 or higher... sigh...
level: 6
paths:
- Modernize
- NormalizedArrays
- Universal
bootstrapFiles:
- phpunit-bootstrap.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
# yamllint disable rule:line-length
# Level 1
# Keep to stay in line with parent class.
-
message: '`^Constructor of class PHPCSExtra\\Universal\\Helpers\\DummyTokenizer has an unused parameter \$content\.$`'
path: Universal/Helpers/DummyTokenizer.php
count: 1
# Level 4
# PHPStan doesn't seem to like uninitialized properties...
# Ref: https://github.com/phpstan/phpstan/issues/10305
-
message: '`^Property \S+Sniff::\$(phpVersion|tabWidth) \(int\) in isset\(\) is not nullable\.$`'
paths:
- Modernize/Sniffs/FunctionCalls/DirnameSniff.php
- Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
- Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php
- Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php
- Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php
- Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php
-
message: '`^Strict comparison using === between true and false will always evaluate to false\.$`'
paths:
- Modernize/Sniffs/FunctionCalls/DirnameSniff.php
- Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
- Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php
- Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php
- Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php
- Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php
-
message: '`^Property PHPCSExtra\\Universal\\Sniffs\\Arrays\\DuplicateArrayKeySniff\:\:\$currentMaxIntKey[GL]t8 \(int\) in isset\(\) is not nullable\.$`'
path: Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
count: 5
-
message: '`^Strict comparison using === between true and true will always evaluate to true\.$`'
path: Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
count: 1
-
message: '`^Result of && is always false\.$`'
path: Universal/Sniffs/Arrays/DuplicateArrayKeySniff.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\.$#'
- '#^Parameter \#2 \$content of method \S+Fixer::replaceToken\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'
# yamllint enable rule:line-length