Skip to content

Commit 6375440

Browse files
committed
The Squiz coding standard now requires lowercase true/false/null for both PHP and JS files
1 parent 1b243bf commit 6375440

File tree

6 files changed

+3
-238
lines changed

6 files changed

+3
-238
lines changed

CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ConstantCaseSniff.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

CodeSniffer/Standards/Squiz/Tests/NamingConventions/ConstantCaseUnitTest.inc

Lines changed: 0 additions & 52 deletions
This file was deleted.

CodeSniffer/Standards/Squiz/Tests/NamingConventions/ConstantCaseUnitTest.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

CodeSniffer/Standards/Squiz/Tests/NamingConventions/ConstantCaseUnitTest.php

Lines changed: 0 additions & 101 deletions
This file was deleted.

CodeSniffer/Standards/Squiz/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<rule ref="Generic.PHP.DeprecatedFunctions"/>
1616
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
1717
<rule ref="Generic.PHP.LowerCaseKeyword"/>
18+
<rule ref="Generic.PHP.LowerCaseConstant"/>
1819
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
1920
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
2021
<rule ref="Generic.WhiteSpace.ScopeIndent"/>

package.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
4040
-- Useful for running the phpcs and phpcbf commands without any arguments at the top of a repository
4141
- Default file paths can now be specified in a ruleset.xml file using the "file" tag
4242
-- File paths are only processed if no files were specified on the command line
43+
- Squiz coding standard now requires lowercase PHP constants (true, false and null)
44+
-- Removed Squiz.NamingConventions.ConstantCase sniff as the rule is now consistent across PHP and JS files
4345
- Interactive mode no longer breaks if you also specify a report type on the command line
4446
- PEAR InlineCommentSniff now fixes the Perl-style comments that it finds (request #375)
4547
- PSR2 standard no longer fixes the placement of docblock open tags as comments are excluded from this standard
@@ -1542,9 +1544,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
15421544
</file>
15431545
</dir>
15441546
<dir name="NamingConventions">
1545-
<file baseinstalldir="PHP" name="ConstantCaseSniff.php" role="php">
1546-
<tasks:replace from="@package_version@" to="version" type="package-info" />
1547-
</file>
15481547
<file baseinstalldir="PHP" name="ValidFunctionNameSniff.php" role="php">
15491548
<tasks:replace from="@package_version@" to="version" type="package-info" />
15501549
</file>
@@ -1958,11 +1957,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
19581957
</file>
19591958
</dir>
19601959
<dir name="NamingConventions">
1961-
<file baseinstalldir="PHP" name="ConstantCaseUnitTest.inc" role="test" />
1962-
<file baseinstalldir="PHP" name="ConstantCaseUnitTest.js" role="test" />
1963-
<file baseinstalldir="PHP" name="ConstantCaseUnitTest.php" role="test">
1964-
<tasks:replace from="@package_version@" to="version" type="package-info" />
1965-
</file>
19661960
<file baseinstalldir="PHP" name="ValidFunctionNameUnitTest.inc" role="test" />
19671961
<file baseinstalldir="PHP" name="ValidFunctionNameUnitTest.php" role="test">
19681962
<tasks:replace from="@package_version@" to="version" type="package-info" />

0 commit comments

Comments
 (0)