Skip to content

Commit 6ef718a

Browse files
committed
PHPCSDev ruleset: disallow Yoda conditions
This sniff was introduced in PHPCS 3.5.0.
1 parent b8285d9 commit 6ef718a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

PHPCSDev/ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@
110110
<severity>0</severity>
111111
</rule>
112112

113+
<!-- Disallow Yoda conditions. -->
114+
<rule ref="Generic.ControlStructures.DisallowYodaConditions"/>
115+
113116

114117
<!--
115118
####################################################################

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ PHPCS itself can also display similar information using the `-vv` or `-vvv` verb
172172

173173
Once this project is installed, you will see a new `PHPCSDev` ruleset in the list of installed standards when you run `phpcs -i`.
174174

175-
**Important: This ruleset currently requires PHP_CodeSniffer >= `3.4.0+`.**
175+
**Important: This ruleset currently requires PHP_CodeSniffer >= `3.5.0+`.**
176176

177177
> As sniffs developers will mostly work with the latest version of PHP_CodeSniffer, this shouldn't cause any problems.
178178
>

0 commit comments

Comments
 (0)