-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
222 lines (206 loc) · 11.3 KB
/
phpcs.xml
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?xml version="1.0"?>
<ruleset name="SingleA CodeSniffer Standard">
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat">
<properties>
<property name="allowMultiline" value="true" />
</properties>
</rule>
<rule ref="PSR12.ControlStructures.BooleanOperatorPlacement">
<properties>
<property name="allowOnly" value="first" />
</properties>
</rule>
<!-- >>> Slevomat -->
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement" />
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace">
<properties>
<property name="spacesAroundBrackets" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma" />
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
<properties>
<property name="groups" type="array">
<element value="uses" />
<element value="enum cases" />
<element value="public constants" />
<element value="protected constants" />
<element value="private constants" />
<element value="public static properties" />
<element value="protected static properties" />
<element value="private static properties" />
<element value="public properties" />
<element value="protected properties" />
<element value="private properties" />
<element value="static constructors" />
<element value="constructor" />
<element value="destructor" />
<element value="magic methods" />
<element value="public static abstract methods" />
<element value="public abstract methods" />
<element value="public static final methods" />
<element value="public static methods" />
<element value="public final methods" />
<element value="public methods" />
<element value="protected static abstract methods" />
<element value="protected abstract methods" />
<element value="protected static final methods" />
<element value="protected static methods" />
<element value="protected final methods" />
<element value="protected methods" />
<element value="private static methods" />
<element value="private methods" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference" />
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration">
<properties>
<property name="modifiersOrder" type="array">
<element value="var" />
<element value="public, protected, private" />
<element value="static, readonly" />
</property>
<property name="checkPromoted" value="true" />
<property name="enableMultipleSpacesBetweenModifiersCheck" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Classes.UselessLateStaticBinding" />
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
<properties>
<property name="annotationsGroups" type="array">
<element value="@deprecated" />
<element value="@template, @template-covariant, @psalm-immutable" />
<element value="@method" />
<element value="@covers, @coversNothing, @coversDefaultClass" />
<element value="@internal, @final, @psalm-internal" />
<element value="@extends, @implements" />
<element value="@psalm-type, @psalm-import-type" />
<element value="@var, @psalm-var, @psalm-property, @psalm-property-read, @psalm-property-write, @readonly, @psalm-readonly-allow-private-mutation, @psalm-allow-private-mutation, @phan-read-only, @phan-write-only" />
<element value="@dataProvider" />
<element value="@param, @psalm-param, @param-out, @phan-param" />
<element value="@throws" />
<element value="@return, @psalm-return, @phan-return" />
<element value="@psalm-external-mutation-free, @psalm-pure, @phan-side-effect-free" />
<element value="@pure-callable" />
<element value="@psalm-assert, @phan-assert" />
<element value="@property, @psalm-property" />
<element value="@see" />
<element value="@suppress, @psalm-suppress, @phpstan-ignore-line, @phpstan-ignore-next-line, @phan-file-suppress, @phan-suppress-next-line, @phan-suppress-current-line, @SuppressWarnings" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
<properties>
<property name="forbiddenCommentPatterns" type="array">
<element value="(^.*\sconstructor\.)" />
<element value="((Developer|Created):.*$)" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" />
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment" />
<rule ref="SlevomatCodingStandard.Complexity.Cognitive">
<properties>
<property name="maxComplexity" value="8" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" />
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch" />
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator" />
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" />
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
<properties>
<property name="ignoreStandaloneIfInScope" value="true" />
<property name="ignoreOneLineTrailingIf" value="true" />
<property name="ignoreTrailingIfWithOneInstruction" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator" />
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn" />
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator" />
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch" />
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch" />
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration">
<properties>
<property name="allowMultiLine" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.StaticClosure" />
<rule ref="SlevomatCodingStandard.Functions.StrictCall" />
<rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction" />
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall" />
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration" />
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure" />
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" />
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration" />
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing" />
<rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile" />
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
<properties>
<property name="linesCountBetweenUseTypes" value="1" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias" />
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators" />
<rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall" />
<rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking" />
<rule ref="SlevomatCodingStandard.PHP.RequireNowdoc" />
<rule ref="SlevomatCodingStandard.PHP.ShortList" />
<rule ref="SlevomatCodingStandard.PHP.TypeCast" />
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="linesCountBeforeDeclare" value="0" />
<property name="linesCountAfterDeclare" value="1" />
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax">
<properties>
<property name="traversableTypeHints" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<properties>
<property name="enableIntersectionTypeHint" value="false" />
</properties>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing" />
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
<properties>
<property name="withSpaces" value="no" />
<property name="shortNullable" value="yes" />
<property name="nullPosition" value="last" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" />
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable" />
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
<rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
<!-- <<< Slevomat -->
</ruleset>