Skip to content

Commit 25488bc

Browse files
committed
PSR2/SwitchDeclaration: update doc as case indentation is not checked
The sniff no longer checks `case` keyword indentation as of commit 4a39005, but the corresponding XML documentation was not updated. This commit aligns the documentation with the current sniff behavior by removing mentions of `case` indentation checks.
1 parent 7fb48d6 commit 25488bc

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
11
<documentation title="Switch Declarations">
22
<standard>
33
<![CDATA[
4-
Case statements should be indented 4 spaces from the switch keyword. It should also be followed by a space. Colons in switch declarations should not be preceded by whitespace. Break statements should be indented 4 more spaces from the case statement. There must be a comment when falling through from one case into the next.
4+
Case statements should be followed by a space. Colons in switch declarations should not be preceded by whitespace. Break statements should be indented 4 more spaces from the case statement. There must be a comment when falling through from one case into the next.
55
]]>
66
</standard>
7-
<code_comparison>
8-
<code title="Valid: Case statement indented correctly.">
9-
<![CDATA[
10-
switch ($foo) {
11-
<em> </em>case 'bar':
12-
break;
13-
}
14-
]]>
15-
</code>
16-
<code title="Invalid: Case statement not indented 4 spaces.">
17-
<![CDATA[
18-
switch ($foo) {
19-
<em></em>case 'bar':
20-
break;
21-
}
22-
]]>
23-
</code>
24-
</code_comparison>
257
<code_comparison>
268
<code title="Valid: Case statement followed by 1 space.">
279
<![CDATA[

0 commit comments

Comments
 (0)