-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpstan.neon.dist
153 lines (144 loc) · 7.05 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
# Larastan
- vendor/nunomaduro/larastan/extension.neon
# PHPStan Rules - Symplify
- vendor/symplify/astral/config/services.neon
- vendor/symplify/phpstan-rules/config/services/services.neon
- vendor/symplify/phpstan-rules/packages/cognitive-complexity/config/cognitive-complexity-services.neon
- vendor/symplify/phpstan-rules/packages/symfony/config/services.neon
- vendor/symplify/phpstan-rules/packages/nette/config/services.neon
rules:
# PHPStan Rules - Symplify
- Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoElseAndElseIfRule
- Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoElseAndElseIfRule
- Symplify\PHPStanRules\Rules\Explicit\NoReadonlyStaticVariableRule
# - Symplify\PHPStanRules\Rules\Explicit\ValueObjectOverArrayShapeRule
- Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule
- Symplify\PHPStanRules\Rules\Explicit\NoVoidAssignRule
- Symplify\PHPStanRules\Rules\NoVoidGetterMethodRule
- Symplify\PHPStanRules\Rules\Domain\EnumSpotterRule
- Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule
- Symplify\PHPStanRules\Rules\NoContainerInjectionInConstructorRule
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule
- Symplify\PHPStanRules\Rules\NoMissingDirPathRule
- Symplify\PHPStanRules\Rules\NoAbstractMethodRule
- Symplify\PHPStanRules\Rules\NoReferenceRule
- Symplify\PHPStanRules\Rules\NoArrayAccessOnObjectRule
- Symplify\PHPStanRules\Rules\NoArrayStringObjectReturnRule
# - Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule
# Symplify\PHPStanRules\Rules\ForbiddenArrayWithStringKeysRule
- Symplify\PHPStanRules\Rules\NoReturnSetterMethodRule
- Symplify\PHPStanRules\Rules\BoolishClassMethodPrefixRule
- Symplify\PHPStanRules\Rules\NoIssetOnObjectRule
- Symplify\PHPStanRules\Rules\NoModifyAndReturnSelfObjectRule
- Symplify\PHPStanRules\Rules\NoDefaultExceptionRule
- Symplify\PHPStanRules\Rules\NoDynamicPropertyOnStaticCallRule
- Symplify\PHPStanRules\Rules\NoFuncCallInMethodCallRule
- Symplify\PHPStanRules\Rules\NoParentMethodCallOnNoOverrideProcessRule
- Symplify\PHPStanRules\Rules\RequireThisCallOnLocalMethodRule
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenSameNamedNewInstanceRule
- Symplify\PHPStanRules\Rules\Complexity\NoDuplicatedArgumentRule
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
- Symplify\PHPStanRules\Rules\ForbiddenThisArgumentRule
- Symplify\PHPStanRules\Rules\ForbiddenMethodCallOnNewRule
- Symplify\PHPStanRules\Rules\CheckConstantExpressionDefinedInConstructOrSetupRule
- Symplify\PHPStanRules\Symfony\Rules\PreventDoubleSetParameterRule
- Symplify\PHPStanRules\Rules\Naming\DifferentMethodNameToReturnTypeRule
- Symplify\PHPStanRules\Rules\DifferentMethodNameToParameterRule
- Symplify\PHPStanRules\Rules\ConstantMapRuleRule
- Symplify\PHPStanRules\Rules\NoBinaryOpCallCompareRule
- Symplify\PHPStanRules\Rules\ForbiddenForeachEmptyMissingArrayRule
- Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule
- Symplify\PHPStanRules\Rules\CheckTypehintCallerTypeRule
- Symplify\PHPStanRules\Rules\NoProtectedElementInFinalClassRule
- Symplify\PHPStanRules\Rules\PrefixAbstractClassRule
- Symplify\PHPStanRules\Rules\RequiredAbstractClassKeywordRule
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
# PHPStan Rules - ergebnis
- Ergebnis\PHPStan\Rules\Closures\NoNullableReturnTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Expressions\NoErrorSuppressionRule
- Ergebnis\PHPStan\Rules\Expressions\NoEvalRule
- Ergebnis\PHPStan\Rules\Functions\NoNullableReturnTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Functions\NoParameterWithNullableTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Functions\NoParameterWithNullDefaultValueRule
- Ergebnis\PHPStan\Rules\Methods\FinalInAbstractClassRule
- Ergebnis\PHPStan\Rules\Methods\NoConstructorParameterWithDefaultValueRule
- Ergebnis\PHPStan\Rules\Methods\NoNullableReturnTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Methods\NoParameterWithNullableTypeDeclarationRule
- Ergebnis\PHPStan\Rules\Methods\NoParameterWithNullDefaultValueRule
- Ergebnis\PHPStan\Rules\Methods\PrivateInFinalClassRule
services:
-
class: Symplify\PHPStanRules\Rules\NoDuplicatedShortClassNameRule
tags: [phpstan.rules.rule]
arguments:
toleratedNestingLevel: 2
-
class: Symplify\PHPStanRules\Rules\PreventDuplicateClassMethodRule
tags: [phpstan.rules.rule]
arguments:
minimumLineCount: 4
-
class: Symplify\PHPStanRules\Rules\ForbiddenComplexFuncCallRule
tags: [phpstan.rules.rule]
arguments:
forbiddenComplexFunctions:
- 'array_filter'
maximumStmtCount: 2
-
class: Symplify\PHPStanRules\Rules\ForbiddenFuncCallRule
tags: [phpstan.rules.rule]
arguments:
forbiddenFunctions:
- 'd'
- 'dd'
- 'dump'
- 'var_dump'
- 'extract'
- 'curl_*'
- 'compact'
- 'property_exists'
- 'spl_autoload_register'
- 'spl_autoload_unregister'
- array_walk
preg_match: "Use Nette\\Utils\\Strings::match() instead"
preg_match_all: "Use Nette\\Utils\\Strings::matchAll() instead"
preg_replace: "Use Nette\\Utils\\Strings::replace() instead"
preg_replace_callback: "Use Nette\\Utils\\Strings::replace() instead"
json_encode: "Use Nette\\Utils\\Json::encode() instead"
json_decode: "Use Nette\\Utils\\Json::decode() instead"
-
class: Symplify\PHPStanRules\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule
tags: [phpstan.rules.rule]
arguments:
maxMethodCognitiveComplexity: 5
-
class: Symplify\PHPStanRules\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule
tags: [phpstan.rules.rule]
arguments:
maxClassCognitiveComplexity: 20
-
class: Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoChainMethodCallRule
tags: [phpstan.rules.rule]
arguments:
allowedChainTypes:
- Illuminate\Support\Str
- Illuminate\Support\Collection
parameters:
level: max
paths:
- src
- config
excludePaths:
- tests/*
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
-
message: '#^Trait (.*)BootstrappersTrait is used zero times and is not analysed.#'
path: src/Concerns/BootstrappersTrait.php
-
message: '#^Trait (.*)ConsoleCallTrait is used zero times and is not analysed.#'
path: src/Concerns/ConsoleCallTrait.php