Skip to content

Commit da6c78d

Browse files
committed
Generic/ArrayIndent: tweak the text of the docs some more
1 parent e4fb292 commit da6c78d

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/Standards/Generic/Docs/Arrays/ArrayIndentStandard.xml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: Opening brace of a multi-line array indented at least to the same level as the start of the statement.">
8+
<code title="Valid: Opening brace of a multi-line array indented to the same level as the start of the statement.">
99
<![CDATA[
10+
$b = <em>[</em>
11+
1,
12+
2,
13+
];
14+
1015
if ($condition) {
1116
$a =
1217
<em> [</em>
@@ -15,13 +20,9 @@ if ($condition) {
1520
];
1621
}
1722
18-
$b = <em>[</em>
19-
1,
20-
2,
21-
];
2223
]]>
2324
</code>
24-
<code title="Invalid: Opening brace of a multi-line array not indented at least to the same level as the start of the statement.">
25+
<code title="Invalid: Opening brace of a multi-line array not indented to the same level as the start of the statement.">
2526
<![CDATA[
2627
if ($condition) {
2728
$a =
@@ -35,11 +36,11 @@ if ($condition) {
3536
</code_comparison>
3637
<standard>
3738
<![CDATA[
38-
The first line of each array element must be indented exactly four spaces more than the start of the statement.
39+
Each array element must be indented exactly four spaces from the start of the statement.
3940
]]>
4041
</standard>
4142
<code_comparison>
42-
<code title="Valid: First line of each array element indented exactly four spaces more than the start of the statement.">
43+
<code title="Valid: Each array element is indented by exactly four spaces.">
4344
<![CDATA[
4445
$a = array(
4546
<em> </em>1,
@@ -48,31 +49,31 @@ $a = array(
4849
);
4950
]]>
5051
</code>
51-
<code title="Invalid: First line of each array element not indented exactly four spaces more than the start of the statement.">
52+
<code title="Invalid: Array elements not indented by four spaces.">
5253
<![CDATA[
5354
$a = array(
5455
<em> </em>1,
55-
2,
56+
<em> </em>2,
5657
<em> </em>3,
5758
);
5859
]]>
5960
</code>
6061
</code_comparison>
6162
<standard>
6263
<![CDATA[
63-
There must be a newline before the array closing brace.
64+
The array closing brace must be on a new line.
6465
]]>
6566
</standard>
6667
<code_comparison>
67-
<code title="Valid: Newline before the array closing brace.">
68+
<code title="Valid: Array closing brace on its own line.">
6869
<![CDATA[
6970
$a = [
7071
1,
7172
2,<em>
7273
]</em>;
7374
]]>
7475
</code>
75-
<code title="Invalid: No newline before the array closing brace.">
76+
<code title="Invalid: Array closing brace not on its own line.">
7677
<![CDATA[
7778
$a = [
7879
1,
@@ -82,19 +83,19 @@ $a = [
8283
</code_comparison>
8384
<standard>
8485
<![CDATA[
85-
The closing brace must be on the same level of indentation as the start of the statement containing the array opener.
86+
The closing brace must be aligned with the start of the statement containing the array opener.
8687
]]>
8788
</standard>
8889
<code_comparison>
89-
<code title="Valid: Closing brace on the same level of indentation as the start of the statement containing the array opener.">
90+
<code title="Valid: Closing brace aligned with the start of the statement containing the array opener.">
9091
<![CDATA[
9192
$a = array(
9293
1,
9394
2,
9495
<em>)</em>;
9596
]]>
9697
</code>
97-
<code title="Invalid: Closing brace not on the same level of indentation as the start of the statement containing the array opener.">
98+
<code title="Invalid: Closing brace not aligned with the start of the statement containing the array opener.">
9899
<![CDATA[
99100
$a = array(
100101
1,

0 commit comments

Comments
 (0)