Skip to content

[Documentation] Squiz: normalise indentation of closing CDATA tags #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<code title="Valid: No spaces around the brackets.">
<![CDATA[
$foo<em></em>[<em></em>'bar'<em></em>];
]]>
]]>
</code>
<code title="Invalid: Spaces around the brackets.">
<![CDATA[
$foo<em> </em>[<em> </em>'bar'<em> </em>];
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<em>final</em> <em>class</em> Foo <em>extends</em> Bar
{
}
]]>
]]>
</code>
<code title="Invalid: Initial capitalization of class keywords.">
<![CDATA[
<em>Final</em> <em>Class</em> Foo <em>Extends</em> Bar
{
}
]]>
]]>
</code>
</code_comparison>
</documentation>
12 changes: 6 additions & 6 deletions src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
<code title="Valid: Lowercase self used.">
<![CDATA[
<em>self</em>::foo();
]]>
]]>
</code>
<code title="Invalid: Uppercase self used.">
<![CDATA[
<em>SELF</em>::foo();
]]>
]]>
</code>
</code_comparison>
<code_comparison>
<code title="Valid: Correct spacing used.">
<![CDATA[
self<em></em>::<em></em>foo();
]]>
]]>
</code>
<code title="Invalid: Incorrect spacing used.">
<![CDATA[
self<em> </em>::<em> </em>foo();
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -42,7 +42,7 @@ class Foo
<em>self</em>::bar();
}
}
]]>
]]>
</code>
<code title="Invalid: Local class name used as reference.">
<![CDATA[
Expand All @@ -57,7 +57,7 @@ class <em>Foo</em>
<em>Foo</em>::bar();
}
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
/**
<em> </em>* @see foo()
<em> </em>*/
]]>
]]>
</code>
<code title="Invalid: Asterisks are not aligned.">
<![CDATA[
/**
<em> </em>* @see foo()
<em></em>*/
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -26,14 +26,14 @@
/**
*<em> </em>@see foo()
*/
]]>
]]>
</code>
<code title="Invalid: Incorrect spacing used.">
<![CDATA[
/**
*<em> </em>@see foo()
*/
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function foo()
{
throw new Exception('Danger!');
}
]]>
]]>
</code>
<code title="Invalid: No @throws tag used for throwing function.">
<![CDATA[
Expand All @@ -26,7 +26,7 @@ function foo()
{
throw new Exception('Danger!');
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
foreach (<em></em>$foo<em> </em>as<em> </em>$bar<em> </em>=><em> </em>$baz<em></em>) {
echo $baz;
}
]]>
]]>
</code>
<code title="Invalid: Invalid spacing used.">
<![CDATA[
foreach (<em> </em>$foo<em> </em>as<em> </em>$bar<em></em>=><em></em>$baz<em> </em>) {
echo $baz;
}
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -26,14 +26,14 @@ foreach (<em> </em>$foo<em> </em>as<em> </em>$bar<em></em>=><em></em>$baz<em>
foreach ($foo <em>as</em> $bar => $baz) {
echo $baz;
}
]]>
]]>
</code>
<code title="Invalid: Uppercase as keyword.">
<![CDATA[
foreach ($foo <em>AS</em> $bar => $baz) {
echo $baz;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
for (<em></em>$i = 0; $i < 10; $i++<em></em>) {
echo $i;
}
]]>
]]>
</code>
<code title="Invalid: Invalid spacing used inside brackets.">
<![CDATA[
for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) {
echo $i;
}
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -26,14 +26,14 @@ for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) {
for ($i = 0<em></em>; $i < 10<em></em>; $i++) {
echo $i;
}
]]>
]]>
</code>
<code title="Invalid: Invalid spacing used before semicolons.">
<![CDATA[
for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) {
echo $i;
}
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -42,14 +42,14 @@ for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) {
for ($i = 0;<em> </em>$i < 10;<em> </em>$i++) {
echo $i;
}
]]>
]]>
</code>
<code title="Invalid: Invalid spacing used after semicolons.">
<![CDATA[
for ($i = 0;<em></em>$i < 10;<em></em>$i++) {
echo $i;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<em>if</em> ($foo) {
$bar = true;
}
]]>
]]>
</code>
<code title="Invalid: Uppercase if keyword.">
<![CDATA[
<em>IF</em> ($foo) {
$bar = true;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
if (<em>isset</em>($foo)) {
echo $foo;
}
]]>
]]>
</code>
<code title="Invalid: isset not called as lowercase.">
<![CDATA[
if (<em>isSet</em>($foo)) {
echo $foo;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
{
return true;
}
]]>
]]>
</code>
<code title="Invalid: Uppercase function keyword.">
<![CDATA[
<em>FUNCTION</em> foo()
{
return true;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
4 changes: 2 additions & 2 deletions src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Foo
return <em>self</em>::$staticMember;
}
}
]]>
]]>
</code>
<code title="Invalid: Using $this-> to access static variables.">
<![CDATA[
Expand All @@ -25,7 +25,7 @@ class Foo
return <em>$this</em>->$staticMember;
}
}
]]>
]]>
</code>
</code_comparison>
</documentation>
4 changes: 2 additions & 2 deletions src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<code title="Valid: Using echo without parentheses.">
<![CDATA[
echo<em> </em>"Hello";
]]>
]]>
</code>
<code title="Invalid: Using echo with parentheses.">
<![CDATA[
echo<em>(</em>"Hello"<em>)</em>;
]]>
]]>
</code>
</code_comparison>
</documentation>
4 changes: 2 additions & 2 deletions src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<code title="Valid: No spaces.">
<![CDATA[
$foo = (<em></em>int<em></em>)'42';
]]>
]]>
</code>
<code title="Invalid: Whitespace used inside parentheses.">
<![CDATA[
$foo = (<em> </em>int<em> </em>)'42';
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
function foo()
<em>{</em>
}
]]>
]]>
</code>
<code title="Invalid: Opening brace is on the same line as the function declaration.">
<![CDATA[
function foo() <em>{</em>
}
]]>
]]>
</code>
</code_comparison>
<code_comparison>
Expand All @@ -26,7 +26,7 @@ function foo()
{
<em> return 42;</em>
}
]]>
]]>
</code>
<code title="Invalid: A blank line after the opening brace.">
<![CDATA[
Expand All @@ -35,7 +35,7 @@ function foo()
<em></em>
return 42;
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<code title="Valid: echo statement with a single space after it.">
<![CDATA[
echo<em> </em>"hi";
]]>
]]>
</code>
<code title="Invalid: echo statement with no space after it.">
<![CDATA[
echo<em></em>"hi";
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<code title="Valid: No spaces around the object operator.">
<![CDATA[
$foo<em></em>-><em></em>bar();
]]>
]]>
</code>
<code title="Invalid: Whitespace surrounding the object operator.">
<![CDATA[
$foo<em> </em>-><em> </em>bar();
]]>
]]>
</code>
</code_comparison>
</documentation>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
public<em> </em>static<em> </em>function foo()
{
}
]]>
]]>
</code>
<code title="Invalid: Multiple spaces following the keywords.">
<![CDATA[
public<em> </em>static<em> </em>function foo()
{
}
]]>
]]>
</code>
</code_comparison>
</documentation>
Loading