-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
27 lines (25 loc) · 987 Bytes
/
phpstan.neon
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
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters:
level: max
paths:
- ./src
ignoreErrors:
# i'm ok with non-booleans in conditions
- '{^Only booleans are allowed in .+}'
# assertions can be redundant
- '{^Call to function assert\(\) with .* will always evaluate to true\.$}'
# runtime checks of generics
- '{^Instanceof between T .+ will always evaluate to true\.$}'
- # phpstan gets tons wrong here, mostly because read changes the return value of peek()
path: src/Parser.src.php
message: '{is unreachable|will always evaluate|always terminates|is always (true|false)}'
- # we know this null check is safe, phpstan can't
path: src/Nodes/Generated/
message: '{^Cannot call method _validate\(\) on .+\|null\.$}'
- # in some contexts this check *is* needed (e.g. yield)
path: src/Nodes/ValidationTraits/UnaryOpExpression.php
message: '{^Left side of \&\& is always true\.$}'
-
path: src/Parser.opt.php
message: '{}'