-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathphpstan.neon.dist
63 lines (57 loc) · 2.26 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
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/phpstan/phpstan-deprecation-rules/rules.neon
- ./vendor/shipmonk/dead-code-detector/rules.neon
- ./rules.neon
parameters:
phpVersion: 70400
internalErrorsCountLimit: 1
paths:
- src
- tests
excludePaths:
analyseAndScan:
- tests/*/data/*
tmpDir: cache/phpstan/
checkMissingCallableSignature: true
checkUninitializedProperties: true
checkBenevolentUnionTypes: true
checkImplicitMixed: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
reportAnyTypeWideningInVarTag: true
reportPossiblyNonexistentConstantArrayOffset: true
reportPossiblyNonexistentGeneralArrayOffset: true
exceptions:
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
implicitThrows: false
uncheckedExceptionClasses:
- LogicException
editorUrl: 'jetbrains://php-storm/navigate/reference?project=phpstan-rules&path=%%relFile%%:%%line%%' # requires usage of JetBrains Toolbox
editorUrlTitle: '%%relFile%%:%%line%%'
shipmonkRules:
classSuffixNaming:
superclassToSuffixMapping:
PHPStan\Rules\Rule: Rule
PhpParser\NodeVisitor: Visitor
ShipMonk\PHPStan\RuleTestCase: RuleTest
enforceClosureParamNativeTypehint:
enabled: false # we support even PHP 7.4, some typehints cannot be used
ignoreErrors:
-
message: "#Class BackedEnum not found\\.#"
path: src/Rule/BackedEnumGenericsRule.php
reportUnmatched: false # fails only for PHP < 8 https://github.com/phpstan/phpstan/issues/6290
-
message: "#but it's missing from the PHPDoc @throws tag\\.$#" # allow uncatched exceptions in tests
path: tests/*
# ignore BC promises
- identifier: phpstanApi.class
- identifier: phpstanApi.method
- identifier: phpstanApi.interface
- identifier: phpstanApi.instanceofAssumption