Skip to content

Commit 458c175

Browse files
committed
Generic/IncrementDecrementSpacing: combine the two <standards> into one
1 parent 88950e3 commit 458c175

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

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

+7-27
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,23 @@
11
<documentation title="Increment Decrement Spacing">
22
<standard>
33
<![CDATA[
4-
There should be no whitespaces between a pre-increment/pre-decrement operator and a variable.
4+
There should be no whitespaces between variables and increment/decrement operators.
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: No whitespaces between a pre-increment/pre-decrement operator and a variable.">
8+
<code title="Valid: No whitespaces between variables and increment/decrement operators.">
99
<![CDATA[
1010
++<em></em>$i;
11-
--<em></em>ClassName::$prop;
12-
--<em></em>$obj->prop;
13-
]]>
14-
</code>
15-
<code title="Invalid: Whitespaces found between a pre-increment/pre-decrement operator and a variable.">
16-
<![CDATA[
17-
++<em> </em>$i;
18-
--<em> </em>ClassName::$prop;
19-
--<em>
20-
</em>$obj->prop;
21-
]]>
22-
</code>
23-
</code_comparison>
24-
<standard>
25-
<![CDATA[
26-
There should be no whitespaces between a variable and a post-increment/post-decrement operator.
27-
]]>
28-
</standard>
29-
<code_comparison>
30-
<code title="Valid: No whitespaces between a variable and a post-increment/post-decrement operator.">
31-
<![CDATA[
32-
$i<em></em>++;
11+
--<em></em>$i['key']['id'];
3312
ClassName::$prop<em></em>++;
3413
$obj->prop<em></em>--;
3514
]]>
3615
</code>
37-
<code title="Invalid: Whitespaces found between a variable and a post-increment/post-decrement operator.">
16+
<code title="Invalid: One or more whitespaces between variables and increment/decrement operators.">
3817
<![CDATA[
39-
$i<em> </em>++;
40-
ClassName::$prop<em> </em>++;
18+
++<em> </em>$i;
19+
--<em> </em>$i['key']['id'];
20+
ClassName::$prop<em> </em>++;
4121
$obj->prop<em>
4222
</em>--;
4323
]]>

0 commit comments

Comments
 (0)