Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic/EmptyPHPStatement: add XML documentation #166

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<documentation title="Empty PHP Statement">
<standard>
<![CDATA[
Empty PHP tags are not allowed.
]]>
</standard>
<code_comparison>
<code title="Valid: There is at least one statement inside the PHP tag pair.">
<![CDATA[
<?php <em>echo 'Hello World';</em> ?>
<?= <em>'Hello World';</em> ?>
]]>
</code>
<code title="Invalid: There is no statement inside the PHP tag pair.">
<![CDATA[
<?php <em>;</em> ?>
<?= <em></em> ?>
]]>
</code>
</code_comparison>
<standard>
<![CDATA[
Superfluous semi-colons are not allowed.
]]>
</standard>
<code_comparison>
<code title="Valid: There is no superfluous semi-colon after a PHP statement.">
<![CDATA[
function_call()<em>;</em>
if (true) {
echo 'Hello World'<em>;</em>
}
]]>
</code>
<code title="Invalid: There are one or more superfluous semi-colons after a PHP statement.">
<![CDATA[
function_call()<em>;;;</em>
if (true) {
echo 'Hello World';
}<em>;</em>
]]>
</code>
</code_comparison>
</documentation>