Skip to content

Commit 30f768d

Browse files
rodrigoprimojrfnl
authored andcommitted
Add documentation for the SpaceBeforeCast sniff
1 parent 9a9f976 commit 30f768d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<documentation title="Space Before Cast">
2+
<standard>
3+
<![CDATA[
4+
There should be exactly one space before a cast operator.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: Single space before a cast operator.">
9+
<![CDATA[
10+
$integer =<em> </em>(int) $string;
11+
$c = $a .<em> </em>(string) $b;
12+
]]>
13+
</code>
14+
<code title="Invalid: No space or multiple spaces before a cast operator.">
15+
<![CDATA[
16+
$integer =<em></em>(int) $string;
17+
$c = $a .<em> </em>(string) $b;
18+
]]>
19+
</code>
20+
</code_comparison>
21+
</documentation>

0 commit comments

Comments
 (0)