File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
src/Standards/Generic/Docs/WhiteSpace Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ <documentation title =" Increment Decrement Spacing" >
2+ <standard >
3+ <![CDATA[
4+ There should be no whitespaces between a pre-increment/pre-decrement operator and a variable.
5+ ]]>
6+ </standard >
7+ <code_comparison >
8+ <code title =" Valid: No whitespaces between a pre-increment/pre-decrement operator and a variable." >
9+ <![CDATA[
10+ ++<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+ <em></em>$i++;
33+ <em></em>ClassName::$prop++;
34+ <em></em>$obj->prop--;
35+ ]]>
36+ </code >
37+ <code title =" Invalid: Whitespaces found between a variable and a post-increment/post-decrement operator." >
38+ <![CDATA[
39+ $i<em> </em>++;
40+ ClassName::$prop<em> </em>++;
41+ $obj->prop<em>
42+ </em>--;
43+ ]]>
44+ </code >
45+ </code_comparison >
46+ </documentation >
You can’t perform that action at this time.
0 commit comments