Skip to content

Commit 6f96ad8

Browse files
authored
Merge pull request #634 from PHPCSStandards/feature/148-squiz-heredoc-add-docs
Squiz/Heredoc: add XML doc
2 parents b1d8ff7 + dfafcd5 commit 6f96ad8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<documentation title="Heredoc">
2+
<standard>
3+
<![CDATA[
4+
Forbids the use of heredoc and nowdoc syntax.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: Using standard strings or inline HTML.">
9+
<![CDATA[
10+
$text = "some $text";
11+
12+
13+
14+
?>
15+
some text
16+
<?php
17+
18+
]]>
19+
</code>
20+
<code title="Invalid: Using heredoc or nowdoc syntax.">
21+
<![CDATA[
22+
$text = <em><<<EOD
23+
some $text
24+
EOD</em>;
25+
26+
echo <em><<<'EOD'
27+
some text
28+
EOD</em>;
29+
]]>
30+
</code>
31+
</code_comparison>
32+
</documentation>

0 commit comments

Comments
 (0)