Skip to content

Commit 24e2aa4

Browse files
authored
Merge pull request #49 from PHPCSStandards/feature/composer-bump-minimum-phpcs
Composer: update minimum PHPCS version to 3.13.0
2 parents 3fa665e + 40e2a80 commit 24e2aa4

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

PHPCSDev/ruleset.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@
119119
<!-- No spacing on the inside of arbitrary parentheses. -->
120120
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing"/>
121121

122+
<!-- No spacing inside heredoc/nowdocs identifiers. -->
123+
<rule ref="Generic.WhiteSpace.HereNowdocIdentifierSpacing"/>
124+
122125
<!-- Align the equal operator in assignment blocks. -->
123126
<rule ref="Generic.Formatting.MultipleStatementAlignment">
124127
<properties>
@@ -225,6 +228,9 @@
225228
<!-- Efficiency: don't unnecessarily use double quotes. -->
226229
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
227230

231+
<!-- Efficiency: don't unnecessarily use heredocs. -->
232+
<rule ref="Generic.Strings.UnnecessaryHeredoc"/>
233+
228234
<!-- Error prevention: warns when an inner loop uses the same incrementor as the outer loop. -->
229235
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
230236

@@ -233,6 +239,9 @@
233239
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/>
234240
</rule>
235241

242+
<!-- Error prevention: use parentheses when mixing boolean operators. -->
243+
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
244+
236245
<!-- Clean up: remove redundant code. -->
237246
<rule ref="Squiz.PHP.NonExecutableCode">
238247
<!-- Allow for return statement in otherwise empty function. -->

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PHPCSDev ruleset for sniff repos
5252

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

55-
**Important: This ruleset currently requires PHP_CodeSniffer >= `3.6.2+`.**
55+
**Important: This ruleset currently requires PHP_CodeSniffer >= `3.13.0+`.**
5656

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"require" : {
2424
"php" : ">=5.4",
25-
"squizlabs/php_codesniffer" : "^3.6.2",
25+
"squizlabs/php_codesniffer" : "^3.13.0",
2626
"phpcompatibility/php-compatibility" : "^9.0.0 || ^10.0.0",
2727
"dealerdirect/phpcodesniffer-composer-installer" : "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0"
2828
},

0 commit comments

Comments
 (0)