Skip to content

Commit 4567a9c

Browse files
authored
codestyle ruleset update (#113)
1 parent ae6bd71 commit 4567a9c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

phpcs.xml.dist

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@
244244
<severity>5</severity><!-- turned off by PSR2 -> turning on with default severity -->
245245
</rule>
246246

247+
<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>
247248
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
249+
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing"/>
248250
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference">
249251
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall"/> <!-- after bumping to PHP8 -->
250252
</rule>
@@ -266,13 +268,15 @@
266268
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
267269
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiConstantDefinition" />
268270
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition" />
271+
<rule ref="SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch"/>
269272
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing" />
270273
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces"/>
271274
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration" />
272275
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration" />
273276
<rule ref="SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature"/>
274277
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing" />
275278
<rule ref="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion" />
279+
<rule ref="SlevomatCodingStandard.Commenting.AnnotationName"/>
276280
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
277281
<properties>
278282
<property name="linesCountBeforeFirstContent" value="0"/>
@@ -298,12 +302,29 @@
298302
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
299303
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
300304
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
305+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator"/>
301306
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
302307
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
303308
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
304-
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch"/>
309+
<rule ref="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch"/>
305310
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
306311
<rule ref="SlevomatCodingStandard.Functions.DisallowNamedArguments"/>
312+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse">
313+
<properties>
314+
<property name="onlySingleLine" value="true"/>
315+
</properties>
316+
</rule>
317+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration">
318+
<properties>
319+
<property name="onlySingleLine" value="true"/>
320+
</properties>
321+
</rule>
322+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall">
323+
<properties>
324+
<property name="onlySingleLine" value="true"/>
325+
</properties>
326+
</rule>
327+
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse"/>
307328
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/>
308329
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
309330
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
@@ -353,6 +374,7 @@
353374
<rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/>
354375
<rule ref="SlevomatCodingStandard.PHP.ReferenceSpacing"/>
355376
<rule ref="SlevomatCodingStandard.PHP.RequireNowdoc"/>
377+
<rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing"/>
356378
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
357379
<properties>
358380
<property name="declareOnFirstLine" value="true"/>
@@ -394,6 +416,7 @@
394416
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
395417
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
396418
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
419+
<rule ref="SlevomatCodingStandard.Variables.DisallowVariableVariable"/>
397420
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/>
398421
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable">
399422
<properties>

0 commit comments

Comments
 (0)