-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
33 lines (30 loc) · 2.14 KB
/
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
28
29
30
31
32
33
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
- vendor/jiripudil/phpstan-sealed-classes/extension.neon
parameters:
level: max
tmpDir: ./tmp/phpstan
paths:
- src
ignoreErrors:
# It is in fact nullable. Probably a bug in PHPStan.
- '#Using nullsafe property access \"\?->excludedTraitMethods\" on left side of \?\? is unnecessary. Use -> instead.#i'
# It's not a native type. Bug in PHPStan.
- '#PHPDoc tag @var with type GoodPhp\\Reflection\\Reflection\\MethodReflection<ReflectableType of UnitEnum, GoodPhp\\Reflection\\Reflection\\Methods\\HasMethods<ReflectableType of UnitEnum>> is not subtype of native type GoodPhp\\Reflection\\Reflection\\MethodReflection<object, GoodPhp\\Reflection\\Reflection\\Methods\\HasMethods<object>>#i'
# Bug with inherited readonly properties
- '#Readonly property [a-z\\]+::\$[a-z0-9]+ is assigned outside of the constructor.#i'
- '#Class [a-z\\]+ has an uninitialized readonly property \$[a-z0-9]+\. Assign it in the constructor.#i'
# Wrongly inferred types
- '#Property GoodPhp\\Reflection\\Type\\Combinatorial\\(IntersectionType|UnionType)::\$types \(Illuminate\\Support\\Collection<int, GoodPhp\\Reflection\\Type\\Type>\) does not accept Illuminate\\Support\\Collection<\(int\|string\), mixed>.#i'
# We expect proper error handling, in which case file_get_contents() will never return `false`
-
message: '#Parameter \#1 \$code of method PhpParser\\Parser::parse\(\) expects string, string\|false given\.#i'
path: 'src/NativePHPDoc/Definition/NativePHPDoc/File/FileContextParser.php'
-
message: '#Parameter \#2 \$aliases of class GoodPhp\\Reflection\\NativePHPDoc\\Definition\\NativePHPDoc\\File\\FileClassLikeContext\\TraitUse constructor expects Illuminate\\Support\\Collection<int, array{string, string\|null, [\d\|]+null}>, Illuminate\\Support\\Collection<int, array{string, string\|null, int\|null}> given\.#i'
path: 'src/NativePHPDoc/Definition/NativePHPDoc/File/ClassLikeContextParsingVisitor.php'
# This, again, I'm not sure how to approach
-
message: '#Unsafe usage of new static\(\)#i'
path: 'src/Util/IsSingleton.php'