Skip to content

Commit

Permalink
Add multiple slevomat rules
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Feb 19, 2024
1 parent 1482cfe commit 65fed26
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<!-- Disallows implicit array creation -->
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>

<!-- Array must have keys specified for either all or none of the values -->
<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>

<!-- Enforces reasonable end bracket placement for multi-line arrays -->
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>

Expand Down Expand Up @@ -190,6 +193,9 @@
<!-- Looks for useless semicolons -->
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>

<!-- Disallows using loose `==` and `!=` comparison operators. Use `===` and `!==` instead -->
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>

<!-- Disallows spaces after negation operator -->
<rule ref="SlevomatCodingStandard.Operators.NegationOperatorSpacing"/>

Expand Down Expand Up @@ -249,4 +255,7 @@

<!-- Reports useless @var annotation for constants because the type of constant is always clear -->
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>

<!-- Checks duplicate spaces anywhere because there aren't sniffs for every part of code to check formatting -->
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces"/>
</ruleset>

0 comments on commit 65fed26

Please sign in to comment.