Skip to content

Commit

Permalink
Merge pull request #634 from PHPCSStandards/feature/148-squiz-heredoc…
Browse files Browse the repository at this point in the history
…-add-docs

Squiz/Heredoc: add XML doc
  • Loading branch information
jrfnl authored Oct 24, 2024
2 parents b1d8ff7 + dfafcd5 commit 6f96ad8
Showing 1 changed file with 32 additions and 0 deletions.
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>

0 comments on commit 6f96ad8

Please sign in to comment.