Skip to content

Commit 313b2ff

Browse files
committed
added sniffs for php 8
1 parent 1fbe30c commit 313b2ff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

InfinityloopCodingStandard/ruleset.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@
308308
</property>
309309
</properties>
310310
</rule>
311+
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion"/>
311312
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
312313
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
313314
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
@@ -389,8 +390,10 @@
389390
</properties>
390391
</rule>
391392
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator"/>
393+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator"/>
392394
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
393395
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
396+
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch"/>
394397
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
395398
<properties>
396399
<property name="psr12Compatible" value="true"/>
@@ -455,6 +458,13 @@
455458
<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
456459
<rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax"/>
457460
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing"/>
461+
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
462+
<properties>
463+
<property name="withSpaces" value="no"/>
464+
<property name="shortNullable" value="yes"/>
465+
<property name="nullPosition" value="last"/>
466+
</properties>
467+
</rule>
458468
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
459469
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma">
460470
<properties>
@@ -469,6 +479,7 @@
469479
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
470480
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
471481
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/>
482+
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/>
472483
<rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator"/>
473484
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
474485
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>

0 commit comments

Comments
 (0)