Skip to content

Commit eb59f0a

Browse files
authored
Merge pull request #36 from PHPCSStandards/feature/ruleset-enforce-boolean-operators-at-start
Ruleset: configure PSR12.ControlStructures.BooleanOperatorPlacement sniff
2 parents aedb280 + 37bcab6 commit eb59f0a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

PHPCSDev/ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@
8181
####################################################################
8282
-->
8383

84+
<!-- PSR12 doesn't enforce consistency in where boolean operators are placed. We do. -->
85+
<rule ref="PSR12.ControlStructures.BooleanOperatorPlacement">
86+
<properties>
87+
<property name="allowOnly" value="first"/>
88+
</properties>
89+
</rule>
90+
8491
<!-- PSR12 appears to ignore blank lines for superfluous whitespace and in several other places. Let's fix that. -->
8592
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
8693
<properties>

0 commit comments

Comments
 (0)