Skip to content

Commit 186814f

Browse files
authored
Merge pull request #159 from rodrigoprimo/add-space-before-cast-documentation
Add documentation for the SpaceBeforeCast sniff
2 parents 040f675 + 1f90b17 commit 186814f

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)