-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathphpstan.neon.dist
197 lines (185 loc) · 9.47 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor/phpstan/phpstan-strict-rules/rules.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\NoSuffixValueObjectClassRule
- 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\Rules\ForbiddenPrivateMethodByTypeRule
tags: [phpstan.rules.rule]
arguments:
forbiddenTypes:
- Symfony\Bundle\FrameworkBundle\Controller\AbstractController
-
class: Symplify\PHPStanRules\Rules\TooDeepNewClassNestingRule
tags: [phpstan.rules.rule]
arguments:
maxNewClassNesting: 2
-
class: Symplify\PHPStanRules\Rules\TooLongVariableRule
tags: [phpstan.rules.rule]
arguments:
maxVariableLength: 25
-
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: 50
-
class: Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoChainMethodCallRule
tags: [phpstan.rules.rule]
arguments:
allowedChainTypes:
- Illuminate\Support\Str
- Illuminate\Support\Collection
parameters:
level: max
paths:
- src
- config
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
typeAliases:
InputOptionType: Symfony\Component\Console\Input\InputOption
InputOptionsTypeArray: 'array<int, InputOptionType>'
InputOptionSignature: 'array{string, string|array<mixed>|null, int|null, string, string|array<mixed>|null}'
InputOptionsArray: 'array<int, InputOptionType|InputOptionSignature>'
ignoreErrors:
- '#^Parameter \#1 \$string of function trim expects string, string\|true given.#'
- '#^Parameter \#1 \$string of function trim expects string, array\|string\|true given.#'
- '#^Method (.*)::getContextComponentFolderNamespace\(\) should return string but returns mixed.#'
- '#^Method (.*)::getContextComponentFolder\(\) should return string but returns mixed.#'
- '#^Construct empty\(\) is not allowed. Use more strict comparison.#'
-
message: '#^Call to an undefined static method (.*)::getMigrationPaths\(\).#'
path: src/Commands/Database/Migrations/Concerns/MigrationPaths.php
-
message: '#^Call to an undefined static method (.*)::getMigrationPath\(\).#'
path: src/Commands/Database/Migrations/Concerns/MigrationPaths.php
-
message: '#^Call to an undefined method (.*)::getFilesFromContext\(\).#'
path: src/Commands/Database/Migrations/Concerns/MigrationPaths.php
-
message: '#^Call to an undefined method (.*)::choose\(\).#'
path: src/Commands/Database/Migrations/Concerns/MigrationPaths.php
-
message: '#^Call to an undefined method (.*)::addAbsolutePath\(\).#'
path: src/Commands/Database/Migrations/Concerns/MigrationPaths.php
-
message: '#^Function \"spl_autoload_register\(\)\" cannot be used\/left in the code#'
path: src/Tools/ClassIterator.php
-
message: '#^Parameter \#1 \$callback of method Illuminate\\Support\\Collection<\(int\|string\),mixed>::map\(\) expects callable\(mixed, \(int\|string\)\): class-string<object>, Closure\(ReflectionClass\): class-string<object> given.#'
path: src/Commands/Concerns/InteractsWithChoices.php