-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
64 lines (59 loc) · 2.79 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
64 lines (59 loc) · 2.79 KB
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
includes:
- phar://phpstan.phar/conf/config.levelmax.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
- ./vendor/phpstan/phpstan-strict-rules/rules.neon
- ./vendor/phpstan/phpstan-phpunit/extension.neon
- ./vendor/phpstan/phpstan-phpunit/rules.neon
- ./vendor/shipmonk/phpstan-rules/rules.neon
- ./rules.neon
parameters:
phpVersion:
min: 80100
max: 80500
paths:
- src
- tests
excludePaths:
analyseAndScan:
- tests/*/data/*
tmpDir: cache/phpstan/
internalErrorsCountLimit: 1
checkMissingCallableSignature: true
checkUninitializedProperties: true
checkBenevolentUnionTypes: true
checkImplicitMixed: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
reportAnyTypeWideningInVarTag: true
reportPossiblyNonexistentConstantArrayOffset: true
reportPossiblyNonexistentGeneralArrayOffset: true
exceptions:
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
throwTypeCovariance: true
implicitThrows: false
uncheckedExceptionClasses:
- LogicException
editorUrl: null # jetbrains://php-storm/navigate/reference?project=dead-code-detector&path=%%relFile%%:%%line%%
editorUrlTitle: '%%relFile%%:%%line%%'
shipmonkRules:
classSuffixNaming:
superclassToSuffixMapping:
PHPStan\Rules\Rule: Rule
PHPStan\Collectors\Collector: Collector
ShipMonk\PHPStanDev\RuleTestCase: RuleTest
ShipMonk\PHPStan\DeadCode\Graph\ClassMemberRef: Ref
ShipMonk\PHPStan\DeadCode\Graph\ClassMemberUsage: Usage
ShipMonk\PHPStan\DeadCode\Provider\MemberUsageProvider: UsageProvider
ShipMonk\PHPStan\DeadCode\Excluder\MemberUsageExcluder: UsageExcluder
ignoreErrors:
-
message: "#but it's missing from the PHPDoc @throws tag\\.$#" # allow uncatched exceptions in tests
path: tests/*
# allow referencing any attribute classes (ReflectionProperty variant only triggers on PHP 8.1,
# where Symfony Console 6.x is installed and MapInput/Argument/Option attribute classes are unknown)
- '#^Parameter \#1 \$name of method PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClass\:\:getAttributes\(\) expects class\-string\|null, string given\.$#'
- '#^Parameter \#1 \$name of method PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionMethod\:\:getAttributes\(\) expects class\-string\|null, string given\.$#'
-
message: '#^Parameter \#1 \$name of method PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionProperty\:\:getAttributes\(\) expects class\-string\|null, string given\.$#'
reportUnmatched: false