-
Notifications
You must be signed in to change notification settings - Fork 23
/
phpstan.neon.dist
86 lines (86 loc) · 3.95 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
75
76
77
78
79
80
81
82
83
84
85
86
parameters:
level: 9
paths:
- app
- config
- database
- tests
bootstrapFiles:
- %currentWorkingDirectory%/phpstan-bootstrap.php
cache:
nodesByStringCountMax: 128
checkUninitializedProperties: true
checkMissingCallableSignature: true
checkGenericClassInNonGenericObjectType: false
excludePaths:
- %currentWorkingDirectory%/*Test.php
ignoreErrors:
- '#Access to an undefined property [\S\s]+::\$[\S\s]+\.#'
- '#should return [\S\s]+ but returns Leevel\\Database\\Ddd\\Entity\.#'
- '#should return [\S\s]+ but returns Leevel\\Database\\Ddd\\Repository\.#'
- '#Property [\S\s]+ does not accept Leevel\\Database\\Ddd\\Entity\.#'
- '#Parameter [\S\s]+ of method [\S\s]+ expects [\S\s]+, [\S\s]+ given\.#'
- '#no value type specified in iterable type array\.#'
- '#no signature specified for Closure\.#'
- '#Cannot call method [\S\s]+ on Leevel\\Support\\[\S\s]+\|null\.#'
- '#Cannot call method withProps\(\) on [\S\s]+\|null\.#'
- '#Argument of an invalid type Leevel\\Support\\TypedIntArray\|null supplied for foreach, only iterables are supported\.#'
- '#Cannot access property \$[\S\s]+ on [\S\s]+\|null\.#'
- '#Cannot access offset [\S\s]+ on mixed\.#'
- '#Cannot cast mixed to[\S\s]+\.#'
- '#Cannot access property [\S\s]+ on mixed\.#'
- '#[\S\s]+ throws checked exception Error but [\S\s]+ missing from the PHPDoc @throws tag\.#'
- '#Class [\S\s]+ has an uninitialized property [\S\s]+. Give it default value or assign it in the constructor\.#'
- '#[\S\s]+ with no signature specified for callable\.#'
- '#Unsafe usage of new static\(\)\.#'
- '#Access to protected property App\\[\S\s]+\\Entity\\[\S\s]+\.#'
- '#Method [\S\s]+ should return Leevel\\Support\\Collection but returns array|Leevel\\Support\\Collection\\.#'
- '#Cannot call method toArray\(\) on[\S\s]+\\.#'
- '#Parameter [\S\s]+ [\S\s]+ of function count expects array|Countable, [\S\s]+ given\\.#'
- '#has [\S\s]+ in PHPDoc @throws tag but it[\S\s]+ not thrown\\.#'
- '#[\S\s]+is unused\\.#'
- '#[\S\s]+but [\S\s]+ missing from the PHPDoc @throws tag\\.#'
- '#Parameter [\S\s]+ of [\S\s]+ expects [\S\s]+, [\S\s]+ given\.#'
- '#[\S\s]+is unused\.#'
- '#[\S\s]+is never read, only written\.#'
- '#Cannot call method get\(\) on string\.#'
- '#[\S\s]+Swoole[\S\s]+\.#'
- '#[\S\s]+throws checked exception ValueError but it\''s missing from the PHPDoc @throws tag\.#'
- '#Constructor of class [\S\s]+ has an unused parameter [\S\s]+\.#'
exceptions:
uncheckedExceptionClasses:
- 'PHPStan\ShouldNotHappenException'
- 'Symfony\Component\Console\Exception\InvalidArgumentException'
- 'PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation'
- 'PHPStan\BetterReflection\SourceLocator\Exception\InvalidArgumentException'
- 'Symfony\Component\Finder\Exception\DirectoryNotFoundException'
- 'InvalidArgumentException'
- 'PHPStan\DependencyInjection\ParameterNotFoundException'
- 'PHPStan\Analyser\UndefinedVariableException'
- 'RuntimeException'
- 'Exception'
- 'Nette\Neon\Exception'
- 'Nette\Utils\JsonException'
- 'PHPStan\File\CouldNotReadFileException'
- 'PHPStan\File\CouldNotWriteFileException'
- 'PHPStan\Parser\ParserErrorsException'
- 'ReflectionException'
- 'Nette\Utils\AssertionException'
- 'PHPStan\File\PathNotFoundException'
- 'PHPStan\Broker\ClassNotFoundException'
- 'PHPStan\Broker\FunctionNotFoundException'
- 'PHPStan\Broker\ConstantNotFoundException'
- 'PHPStan\Reflection\MissingMethodFromReflectionException'
- 'PHPStan\Reflection\MissingPropertyFromReflectionException'
- 'PHPStan\Reflection\MissingConstantFromReflectionException'
- 'PHPStan\Type\CircularTypeAliasDefinitionException'
- 'PHPStan\Broker\ClassAutoloadingException'
- 'LogicException'
- 'TypeError'
- 'DivisionByZeroError'
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
reportStaticMethodSignatures: true
tmpDir: %rootDir%/../storage/phpstan
reportUnmatchedIgnoredErrors: false