File tree 1 file changed +7
-27
lines changed
src/Standards/Generic/Docs/WhiteSpace
1 file changed +7
-27
lines changed Original file line number Diff line number Diff line change 1
1
<documentation title =" Increment Decrement Spacing" >
2
2
<standard >
3
3
<![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 .
5
5
]]>
6
6
</standard >
7
7
<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 ." >
9
9
<![CDATA[
10
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
- $i<em></em>++;
11
+ --<em></em>$i['key']['id'];
33
12
ClassName::$prop<em></em>++;
34
13
$obj->prop<em></em>--;
35
14
]]>
36
15
</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 ." >
38
17
<![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>++;
41
21
$obj->prop<em>
42
22
</em>--;
43
23
]]>
You can’t perform that action at this time.
0 commit comments