Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/Standards/Squiz/Docs/PHP/HeredocStandard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<documentation title="Heredoc">
<standard>
<![CDATA[
Forbids the use of heredoc and nowdoc syntax.
]]>
</standard>
<code_comparison>
<code title="Valid: Using standard strings or inline HTML.">
<![CDATA[
$text = "some $text";



?>
some text
<?php

]]>
</code>
<code title="Invalid: Using heredoc or nowdoc syntax.">
<![CDATA[
$text = <em><<<EOD
some $text
EOD</em>;

echo <em><<<'EOD'
some text
EOD</em>;
]]>
</code>
</code_comparison>
</documentation>
Loading