Skip to content

Commit eab6c70

Browse files
authored
Generic/IncrementDecrementSpacing: add XML documentation (#287)
* Generic/IncrementDecrementSpacing: add XML documentation
1 parent 68bb4dc commit eab6c70

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<documentation title="Increment Decrement Spacing">
2+
<standard>
3+
<![CDATA[
4+
There should be no whitespace between variables and increment/decrement operators.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: No whitespace between variables and increment/decrement operators.">
9+
<![CDATA[
10+
++<em></em>$i;
11+
--<em></em>$i['key']['id'];
12+
ClassName::$prop<em></em>++;
13+
$obj->prop<em></em>--;
14+
]]>
15+
</code>
16+
<code title="Invalid: Whitespace between variables and increment/decrement operators.">
17+
<![CDATA[
18+
++<em> </em>$i;
19+
--<em> </em>$i['key']['id'];
20+
ClassName::$prop<em> </em>++;
21+
$obj->prop<em>
22+
</em>--;
23+
]]>
24+
</code>
25+
</code_comparison>
26+
</documentation>

0 commit comments

Comments
 (0)