You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml
+1-19Lines changed: 1 addition & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,9 @@
1
1
<documentationtitle="Switch Declarations">
2
2
<standard>
3
3
<![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.
5
5
]]>
6
6
</standard>
7
-
<code_comparison>
8
-
<codetitle="Valid: Case statement indented correctly.">
9
-
<![CDATA[
10
-
switch ($foo) {
11
-
<em> </em>case 'bar':
12
-
break;
13
-
}
14
-
]]>
15
-
</code>
16
-
<codetitle="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>
25
7
<code_comparison>
26
8
<codetitle="Valid: Case statement followed by 1 space.">
0 commit comments