Skip to content

Commit 87f1d4d

Browse files
jaymcpjrfnl
authored andcommitted
Docs: add documentation for Squiz.WhiteSpace.ScopeClosingBrace
1 parent 36d019c commit 87f1d4d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<documentation title="Scope Closing Brace">
2+
<standard>
3+
<![CDATA[
4+
Closing brace indentation must match opening brace.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: Closing brace indented correctly.">
9+
<![CDATA[
10+
function foo()
11+
<em>{</em>
12+
echo 'hi';
13+
}
14+
]]>
15+
</code>
16+
<code title="Invalid: Closing brace indented incorrectly.">
17+
<![CDATA[
18+
function foo()
19+
{
20+
echo 'hi';
21+
<em> }</em>
22+
]]>
23+
</code>
24+
</code_comparison>
25+
<standard>
26+
<![CDATA[
27+
Closing brace must be on a line by itself.
28+
]]>
29+
</standard>
30+
<code_comparison>
31+
<code title="Valid: Closing brace is on a line by itself.">
32+
<![CDATA[
33+
function foo()
34+
{
35+
echo 'hi';
36+
<em>}</em>
37+
]]>
38+
</code>
39+
<code title="Invalid: Closing brace is alongside other content.">
40+
<![CDATA[
41+
function foo()
42+
{
43+
echo 'hi';<em>}</em>
44+
]]>
45+
</code>
46+
</code_comparison>
47+
</documentation>

0 commit comments

Comments
 (0)