Skip to content

Commit 228e71a

Browse files
authored
Merge pull request #361 from jonmcp/docs/squiz/standardise-indentation
[Documentation] Squiz: normalise indentation of closing CDATA tags
2 parents 8e3a124 + 3f08508 commit 228e71a

18 files changed

+50
-50
lines changed

src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<code title="Valid: No spaces around the brackets.">
99
<![CDATA[
1010
$foo<em></em>[<em></em>'bar'<em></em>];
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: Spaces around the brackets.">
1414
<![CDATA[
1515
$foo<em> </em>[<em> </em>'bar'<em> </em>];
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
</documentation>

src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<em>final</em> <em>class</em> Foo <em>extends</em> Bar
1111
{
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Initial capitalization of class keywords.">
1616
<![CDATA[
1717
<em>Final</em> <em>Class</em> Foo <em>Extends</em> Bar
1818
{
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
</documentation>

src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
<code title="Valid: Lowercase self used.">
99
<![CDATA[
1010
<em>self</em>::foo();
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: Uppercase self used.">
1414
<![CDATA[
1515
<em>SELF</em>::foo();
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
<code_comparison>
2020
<code title="Valid: Correct spacing used.">
2121
<![CDATA[
2222
self<em></em>::<em></em>foo();
23-
]]>
23+
]]>
2424
</code>
2525
<code title="Invalid: Incorrect spacing used.">
2626
<![CDATA[
2727
self<em> </em>::<em> </em>foo();
28-
]]>
28+
]]>
2929
</code>
3030
</code_comparison>
3131
<code_comparison>
@@ -42,7 +42,7 @@ class Foo
4242
<em>self</em>::bar();
4343
}
4444
}
45-
]]>
45+
]]>
4646
</code>
4747
<code title="Invalid: Local class name used as reference.">
4848
<![CDATA[
@@ -57,7 +57,7 @@ class <em>Foo</em>
5757
<em>Foo</em>::bar();
5858
}
5959
}
60-
]]>
60+
]]>
6161
</code>
6262
</code_comparison>
6363
</documentation>

src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
/**
1111
<em> </em>* @see foo()
1212
<em> </em>*/
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Asterisks are not aligned.">
1616
<![CDATA[
1717
/**
1818
<em> </em>* @see foo()
1919
<em></em>*/
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
@@ -26,14 +26,14 @@
2626
/**
2727
*<em> </em>@see foo()
2828
*/
29-
]]>
29+
]]>
3030
</code>
3131
<code title="Invalid: Incorrect spacing used.">
3232
<![CDATA[
3333
/**
3434
*<em> </em>@see foo()
3535
*/
36-
]]>
36+
]]>
3737
</code>
3838
</code_comparison>
3939
</documentation>

src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function foo()
1515
{
1616
throw new Exception('Danger!');
1717
}
18-
]]>
18+
]]>
1919
</code>
2020
<code title="Invalid: No @throws tag used for throwing function.">
2121
<![CDATA[
@@ -26,7 +26,7 @@ function foo()
2626
{
2727
throw new Exception('Danger!');
2828
}
29-
]]>
29+
]]>
3030
</code>
3131
</code_comparison>
3232
</documentation>

src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
foreach (<em></em>$foo<em> </em>as<em> </em>$bar<em> </em>=><em> </em>$baz<em></em>) {
1111
echo $baz;
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Invalid spacing used.">
1616
<![CDATA[
1717
foreach (<em> </em>$foo<em> </em>as<em> </em>$bar<em></em>=><em></em>$baz<em> </em>) {
1818
echo $baz;
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
@@ -26,14 +26,14 @@ foreach (<em> </em>$foo<em> </em>as<em> </em>$bar<em></em>=><em></em>$baz<em>
2626
foreach ($foo <em>as</em> $bar => $baz) {
2727
echo $baz;
2828
}
29-
]]>
29+
]]>
3030
</code>
3131
<code title="Invalid: Uppercase as keyword.">
3232
<![CDATA[
3333
foreach ($foo <em>AS</em> $bar => $baz) {
3434
echo $baz;
3535
}
36-
]]>
36+
]]>
3737
</code>
3838
</code_comparison>
3939
</documentation>

src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
for (<em></em>$i = 0; $i < 10; $i++<em></em>) {
1111
echo $i;
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Invalid spacing used inside brackets.">
1616
<![CDATA[
1717
for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) {
1818
echo $i;
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
@@ -26,14 +26,14 @@ for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) {
2626
for ($i = 0<em></em>; $i < 10<em></em>; $i++) {
2727
echo $i;
2828
}
29-
]]>
29+
]]>
3030
</code>
3131
<code title="Invalid: Invalid spacing used before semicolons.">
3232
<![CDATA[
3333
for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) {
3434
echo $i;
3535
}
36-
]]>
36+
]]>
3737
</code>
3838
</code_comparison>
3939
<code_comparison>
@@ -42,14 +42,14 @@ for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) {
4242
for ($i = 0;<em> </em>$i < 10;<em> </em>$i++) {
4343
echo $i;
4444
}
45-
]]>
45+
]]>
4646
</code>
4747
<code title="Invalid: Invalid spacing used after semicolons.">
4848
<![CDATA[
4949
for ($i = 0;<em></em>$i < 10;<em></em>$i++) {
5050
echo $i;
5151
}
52-
]]>
52+
]]>
5353
</code>
5454
</code_comparison>
5555
</documentation>

src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<em>if</em> ($foo) {
1111
$bar = true;
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Uppercase if keyword.">
1616
<![CDATA[
1717
<em>IF</em> ($foo) {
1818
$bar = true;
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
</documentation>

src/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
if (<em>isset</em>($foo)) {
1111
echo $foo;
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: isset not called as lowercase.">
1616
<![CDATA[
1717
if (<em>isSet</em>($foo)) {
1818
echo $foo;
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
</documentation>

src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
{
1212
return true;
1313
}
14-
]]>
14+
]]>
1515
</code>
1616
<code title="Invalid: Uppercase function keyword.">
1717
<![CDATA[
1818
<em>FUNCTION</em> foo()
1919
{
2020
return true;
2121
}
22-
]]>
22+
]]>
2323
</code>
2424
</code_comparison>
2525
</documentation>

src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Foo
1414
return <em>self</em>::$staticMember;
1515
}
1616
}
17-
]]>
17+
]]>
1818
</code>
1919
<code title="Invalid: Using $this-> to access static variables.">
2020
<![CDATA[
@@ -25,7 +25,7 @@ class Foo
2525
return <em>$this</em>->$staticMember;
2626
}
2727
}
28-
]]>
28+
]]>
2929
</code>
3030
</code_comparison>
3131
</documentation>

src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<code title="Valid: Using echo without parentheses.">
99
<![CDATA[
1010
echo<em> </em>"Hello";
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: Using echo with parentheses.">
1414
<![CDATA[
1515
echo<em>(</em>"Hello"<em>)</em>;
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
</documentation>

src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<code title="Valid: No spaces.">
99
<![CDATA[
1010
$foo = (<em></em>int<em></em>)'42';
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: Whitespace used inside parentheses.">
1414
<![CDATA[
1515
$foo = (<em> </em>int<em> </em>)'42';
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
</documentation>

src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
function foo()
1111
<em>{</em>
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Opening brace is on the same line as the function declaration.">
1616
<![CDATA[
1717
function foo() <em>{</em>
1818
}
19-
]]>
19+
]]>
2020
</code>
2121
</code_comparison>
2222
<code_comparison>
@@ -26,7 +26,7 @@ function foo()
2626
{
2727
<em> return 42;</em>
2828
}
29-
]]>
29+
]]>
3030
</code>
3131
<code title="Invalid: A blank line after the opening brace.">
3232
<![CDATA[
@@ -35,7 +35,7 @@ function foo()
3535
<em></em>
3636
return 42;
3737
}
38-
]]>
38+
]]>
3939
</code>
4040
</code_comparison>
4141
</documentation>

src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<code title="Valid: echo statement with a single space after it.">
99
<![CDATA[
1010
echo<em> </em>"hi";
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: echo statement with no space after it.">
1414
<![CDATA[
1515
echo<em></em>"hi";
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
</documentation>

src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<code title="Valid: No spaces around the object operator.">
99
<![CDATA[
1010
$foo<em></em>-><em></em>bar();
11-
]]>
11+
]]>
1212
</code>
1313
<code title="Invalid: Whitespace surrounding the object operator.">
1414
<![CDATA[
1515
$foo<em> </em>-><em> </em>bar();
16-
]]>
16+
]]>
1717
</code>
1818
</code_comparison>
1919
</documentation>

src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
public<em> </em>static<em> </em>function foo()
1111
{
1212
}
13-
]]>
13+
]]>
1414
</code>
1515
<code title="Invalid: Multiple spaces following the keywords.">
1616
<![CDATA[
1717
public<em> </em>static<em> </em>function foo()
1818
{
1919
}
20-
]]>
20+
]]>
2121
</code>
2222
</code_comparison>
2323
</documentation>

0 commit comments

Comments
 (0)