Skip to content

Commit 017b827

Browse files
authored
Merge pull request #414 from cakephp/phpcs-deprecated-sniffs
Replace deprecated sniffs
2 parents 2834a04 + 3510e59 commit 017b827

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

CakePHP/ruleset.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,15 @@
5151
</properties>
5252
<exclude-pattern>*/tests/*</exclude-pattern>
5353
</rule>
54-
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
54+
<rule ref="Generic.Formatting.SpaceAfterCast">
55+
<properties>
56+
<property name="spacing" value="0"/>
57+
</properties>
58+
</rule>
5559
<rule ref="Generic.PHP.DeprecatedFunctions"/>
5660
<rule ref="Generic.PHP.ForbiddenFunctions"/>
5761
<rule ref="Generic.PHP.NoSilencedErrors"/>
62+
<rule ref="Generic.WhiteSpace.LanguageConstructSpacing"/>
5863

5964
<!-- Relax CakePHP rules -->
6065
<rule ref="CakePHP.Commenting.FunctionComment">
@@ -84,7 +89,6 @@
8489
<rule ref="Squiz.Scope.MemberVarScope"/>
8590
<rule ref="Squiz.Scope.StaticThisUsage"/>
8691
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
87-
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
8892
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
8993
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
9094
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>

docs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CakePHP (19 sniffs)
2424
- CakePHP.WhiteSpace.FunctionSpacing
2525
- CakePHP.WhiteSpace.TabAndSpace
2626

27-
Generic (25 sniffs)
27+
Generic (26 sniffs)
2828
-------------------
2929
- Generic.Arrays.DisallowLongArraySyntax
3030
- Generic.CodeAnalysis.ForLoopShouldBeWhileLoop
@@ -37,7 +37,7 @@ Generic (25 sniffs)
3737
- Generic.Files.LineEndings
3838
- Generic.Files.LineLength
3939
- Generic.Formatting.DisallowMultipleStatements
40-
- Generic.Formatting.NoSpaceAfterCast
40+
- Generic.Formatting.SpaceAfterCast
4141
- Generic.Functions.FunctionCallArgumentSpacing
4242
- Generic.NamingConventions.UpperCaseConstantName
4343
- Generic.PHP.DeprecatedFunctions
@@ -50,6 +50,7 @@ Generic (25 sniffs)
5050
- Generic.PHP.NoSilencedErrors
5151
- Generic.WhiteSpace.DisallowTabIndent
5252
- Generic.WhiteSpace.IncrementDecrementSpacing
53+
- Generic.WhiteSpace.LanguageConstructSpacing
5354
- Generic.WhiteSpace.ScopeIndent
5455

5556
PEAR (1 sniff)
@@ -149,7 +150,7 @@ SlevomatCodingStandard (52 sniffs)
149150
- SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable
150151
- SlevomatCodingStandard.Variables.UnusedVariable
151152

152-
Squiz (28 sniffs)
153+
Squiz (27 sniffs)
153154
-----------------
154155
- Squiz.Arrays.ArrayBracketSpacing
155156
- Squiz.Classes.ClassFileName
@@ -173,7 +174,6 @@ Squiz (28 sniffs)
173174
- Squiz.Scope.StaticThisUsage
174175
- Squiz.WhiteSpace.CastSpacing
175176
- Squiz.WhiteSpace.ControlStructureSpacing
176-
- Squiz.WhiteSpace.LanguageConstructSpacing
177177
- Squiz.WhiteSpace.LogicalOperatorSpacing
178178
- Squiz.WhiteSpace.ScopeClosingBrace
179179
- Squiz.WhiteSpace.ScopeKeywordSpacing
@@ -182,4 +182,4 @@ Squiz (28 sniffs)
182182

183183
Zend (1 sniff)
184184
--------------
185-
- Zend.NamingConventions.ValidVariableName
185+
- Zend.NamingConventions.ValidVariableName

0 commit comments

Comments
 (0)