Skip to content

Commit f766a2c

Browse files
authored
Merge pull request #59 from PHPCSStandards/feature/forbid-implicit-boolean-comparisons
Ruleset: forbid use of the `!` not operator
2 parents 4b9fdd2 + a260482 commit f766a2c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PHPCSDev/ruleset.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@
151151
<!-- Only one object structure per file. -->
152152
<rule ref="Generic.Files.OneObjectStructurePerFile"/>
153153

154+
<!-- Disallow non-strict comparisons and the use of the not operator. -->
155+
<rule ref="Squiz.Operators.ComparisonOperatorUsage">
156+
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue"/>
157+
</rule>
158+
154159

155160
<!--
156161
####################################################################

0 commit comments

Comments
 (0)