Skip to content

Commit 329ad21

Browse files
authored
Merge pull request #572 from PHPCSStandards/feature/docs-minor-consistency-fixes
Documentation: minor consistency fixes
2 parents 9e73d47 + b430e54 commit 329ad21

File tree

37 files changed

+97
-113
lines changed

37 files changed

+97
-113
lines changed

src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: value to be asserted must go on the right side of the comparison.">
8+
<code title="Valid: Value to be asserted must go on the right side of the comparison.">
99
<![CDATA[
1010
if ($test === null) <em>{</em>
1111
$var = 1;
1212
<em>}</em>
1313
]]>
1414
</code>
15-
<code title="Invalid: value to be asserted must not be on the left.">
15+
<code title="Invalid: Value to be asserted must not be on the left.">
1616
<![CDATA[
1717
if (null === $test) <em>{</em>
1818
$var = 1;

src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<documentation title="Inline HTML">
22
<standard>
33
<![CDATA[
4-
Files that contain php code should only have php code and should not have any "inline html".
4+
Files that contain PHP code should only have PHP code and should not have any "inline html".
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: A php file with only php code in it.">
8+
<code title="Valid: A PHP file with only PHP code in it.">
99
<![CDATA[
1010
<?php
1111
$foo = 'bar';
1212
echo $foo . 'baz';
1313
]]>
1414
</code>
15-
<code title="Invalid: A php file with html in it outside of the php tags.">
15+
<code title="Invalid: A PHP file with html in it outside of the PHP tags.">
1616
<![CDATA[
1717
<em>some string here</em>
1818
<?php

src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<documentation title="Aligning Blocks of Assignments">
22
<standard>
33
<![CDATA[
4-
There should be one space on either side of an equals sign used to assign a value to a variable. In the case of a block of related assignments, more space may be inserted to promote readability.
4+
There should be one space on either side of an equals sign used to assign a value to a variable. In the case of a block of related assignments, more space may be inserted to promote readability.
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Equals signs aligned">
8+
<code title="Valid: Equals signs aligned.">
99
<![CDATA[
1010
$shortVar <em>=</em> (1 + 2);
1111
$veryLongVarName <em>=</em> 'string';
1212
$var <em>=</em> foo($bar, $baz);
1313
]]>
1414
</code>
15-
<code title="Not aligned; harder to read">
15+
<code title="Invalid: Not aligned; harder to read.">
1616
<![CDATA[
1717
$shortVar <em>=</em> (1 + 2);
1818
$veryLongVarName <em>=</em> 'string';
@@ -22,31 +22,31 @@ $var <em>=</em> foo($bar, $baz);
2222
</code_comparison>
2323
<standard>
2424
<![CDATA[
25-
When using plus-equals, minus-equals etc. still ensure the equals signs are aligned to one space after the longest variable name.
25+
When using plus-equals, minus-equals etc. still ensure the equals signs are aligned to one space after the longest variable name.
2626
]]>
2727
</standard>
2828
<code_comparison>
29-
<code title="Equals signs aligned; only one space after longest var name">
29+
<code title="Valid: Equals signs aligned; only one space after longest var name.">
3030
<![CDATA[
3131
$shortVar <em>+= </em>1;
3232
$veryLongVarName<em> = </em>1;
3333
]]>
3434
</code>
35-
<code title="Two spaces after longest var name">
35+
<code title="Invalid: Two spaces after longest var name.">
3636
<![CDATA[
3737
$shortVar <em> += </em>1;
3838
$veryLongVarName<em> = </em>1;
3939
]]>
4040
</code>
4141
</code_comparison>
4242
<code_comparison>
43-
<code title="Equals signs aligned">
43+
<code title="Valid: Equals signs aligned.">
4444
<![CDATA[
4545
$shortVar <em> = </em>1;
4646
$veryLongVarName<em> -= </em>1;
4747
]]>
4848
</code>
49-
<code title="Equals signs not aligned">
49+
<code title="Invalid: Equals signs not aligned.">
5050
<![CDATA[
5151
$shortVar <em> = </em>1;
5252
$veryLongVarName<em> -= </em>1;

src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: brace on next line">
8+
<code title="Valid: Brace on next line.">
99
<![CDATA[
1010
function fooFunction($arg1, $arg2 = '')
1111
<em>{</em>
1212
...
1313
}
1414
]]>
1515
</code>
16-
<code title="Invalid: brace on same line">
16+
<code title="Invalid: Brace on same line.">
1717
<![CDATA[
1818
function fooFunction($arg1, $arg2 = '') <em>{</em>
1919
...

src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: brace on same line">
8+
<code title="Valid: Brace on same line.">
99
<![CDATA[
1010
function fooFunction($arg1, $arg2 = '')<em> {</em>
1111
...
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: brace on next line">
15+
<code title="Invalid: Brace on next line.">
1616
<![CDATA[
1717
function fooFunction($arg1, $arg2 = '')
1818
<em>{</em>

src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: ">
8+
<code title="Valid: Class name starts with 'Abstract'.">
99
<![CDATA[
1010
abstract class <em>AbstractBar</em>
1111
{
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: ">
15+
<code title="Invalid: Class name does not start with 'Abstract'.">
1616
<![CDATA[
1717
abstract class <em>Bar</em>
1818
{

src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: ">
8+
<code title="Valid: Interface name ends on 'Interface'.">
99
<![CDATA[
1010
interface <em>BarInterface</em>
1111
{
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: ">
15+
<code title="Invalid: Interface name does not end on 'Interface'.">
1616
<![CDATA[
1717
interface <em>Bar</em>
1818
{

src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: ">
8+
<code title="Valid: Trait name ends on 'Trait'.">
99
<![CDATA[
1010
trait <em>BarTrait</em>
1111
{
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: ">
15+
<code title="Invalid: Trait name does not end on 'Trait'.">
1616
<![CDATA[
1717
trait <em>Bar</em>
1818
{

src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<documentation title="Constant Names">
22
<standard>
33
<![CDATA[
4-
Constants should always be all-uppercase, with underscores to separate words.
4+
Constants should always be all-uppercase, with underscores to separate words.
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: all uppercase">
8+
<code title="Valid: All uppercase constant name.">
99
<![CDATA[
1010
define('<em>FOO_CONSTANT</em>', 'foo');
1111
@@ -15,7 +15,7 @@ class FooClass
1515
}
1616
]]>
1717
</code>
18-
<code title="Invalid: mixed case">
18+
<code title="Invalid: Mixed case or lowercase constant name.">
1919
<![CDATA[
2020
define('<em>Foo_Constant</em>', 'foo');
2121

src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<documentation title="Opening Tag at Start of File">
22
<standard>
33
<![CDATA[
4-
The opening php tag should be the first item in the file.
4+
The opening PHP tag should be the first item in the file.
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: A file starting with an opening php tag.">
8+
<code title="Valid: A file starting with an opening PHP tag.">
99
<![CDATA[
1010
<em></em><?php
1111
echo 'Foo';
1212
]]>
1313
</code>
14-
<code title="Invalid: A file with content before the opening php tag.">
14+
<code title="Invalid: A file with content before the opening PHP tag.">
1515
<![CDATA[
1616
<em>Beginning content</em>
1717
<?php

src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<documentation title="Closing PHP Tags">
22
<standard>
33
<![CDATA[
4-
All opening php tags should have a corresponding closing tag.
4+
All opening PHP tags should have a corresponding closing tag.
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: A closing tag paired with it's opening tag.">
8+
<code title="Valid: A closing tag paired with its opening tag.">
99
<![CDATA[
1010
<em><?php</em>
1111
echo 'Foo';

src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: lowercase constants">
8+
<code title="Valid: Lowercase constants.">
99
<![CDATA[
1010
if ($var === <em>false</em> || $var === <em>null</em>) {
1111
$var = <em>true</em>;
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: uppercase constants">
15+
<code title="Invalid: Uppercase constants.">
1616
<![CDATA[
1717
if ($var === <em>FALSE</em> || $var === <em>NULL</em>) {
1818
$var = <em>TRUE</em>;

src/Standards/Generic/Docs/PHP/RequireStrictTypesStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: strict_types declaration is present.">
8+
<code title="Valid: `strict_types` declaration is present.">
99
<![CDATA[
1010
declare(<em>strict_types=1</em>);
1111
1212
declare(encoding='UTF-8', <em>strict_types=0</em>);
1313
]]>
1414
</code>
15-
<code title="Invalid: Missing strict_types declaration.">
15+
<code title="Invalid: Missing `strict_types` declaration.">
1616
<![CDATA[
1717
declare(encoding='ISO-8859-1'<em></em>);
1818
]]>
@@ -24,12 +24,12 @@ declare(encoding='ISO-8859-1'<em></em>);
2424
]]>
2525
</standard>
2626
<code_comparison>
27-
<code title="Valid: strict_types declaration is enabled.">
27+
<code title="Valid: `strict_types` declaration is enabled.">
2828
<![CDATA[
2929
declare(strict_types=<em>1</em>);
3030
]]>
3131
</code>
32-
<code title="Invalid: strict_types declaration is disabled.">
32+
<code title="Invalid: `strict_types` declaration is disabled.">
3333
<![CDATA[
3434
declare(strict_types=<em>0</em>);
3535
]]>

src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (<em>PHP_SAPI</em> === 'cli') {
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: php_sapi_name() is used.">
15+
<code title="Invalid: Function call to php_sapi_name() is used.">
1616
<![CDATA[
1717
if (<em>php_sapi_name()</em> === 'cli') {
1818
echo "Hello, CLI user.";

src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: uppercase constants">
8+
<code title="Valid: Uppercase constants.">
99
<![CDATA[
1010
if ($var === <em>FALSE</em> || $var === <em>NULL</em>) {
1111
$var = <em>TRUE</em>;
1212
}
1313
]]>
1414
</code>
15-
<code title="Invalid: lowercase constants">
15+
<code title="Invalid: Lowercase constants.">
1616
<![CDATA[
1717
if ($var === <em>false</em> || $var === <em>null</em>) {
1818
$var = <em>true</em>;
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<documentation title="Subversion Properties">
22
<standard>
33
<![CDATA[
4-
All php files in a subversion repository should have the svn:keywords property set to 'Author Id Revision' and the svn:eol-style property set to 'native'.
4+
All PHP files in a subversion repository should have the svn:keywords property set to 'Author Id Revision' and the svn:eol-style property set to 'native'.
55
]]>
66
</standard>
77
</documentation>

src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: no spaces on the inside of a set of arbitrary parentheses.">
8+
<code title="Valid: No spaces on the inside of a set of arbitrary parentheses.">
99
<![CDATA[
1010
$a = (null !== $extra);
1111
]]>
1212
</code>
13-
<code title="Invalid: spaces or new lines on the inside of a set of arbitrary parentheses.">
13+
<code title="Invalid: Spaces or new lines on the inside of a set of arbitrary parentheses.">
1414
<![CDATA[
1515
$a = ( null !== $extra );
1616

src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function foo(<em>&...$spread</em>) {
1717
}
1818
]]>
1919
</code>
20-
<code title="Invalid: space found between the spread operator and the variable/function call it applies to.">
20+
<code title="Invalid: Space found between the spread operator and the variable/function call it applies to.">
2121
<![CDATA[
2222
function bar(<em>... </em>$spread) {
2323
bar(<em>...

0 commit comments

Comments
 (0)