-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/EmptyPHPStatement: add XML documentation (#166)
* Generic/EmptyPHPStatement: add documentation * Fix one of the invalid examples in EmptyPHPStatementStandard.xml
- Loading branch information
1 parent
0c9a88b
commit f8e0b67
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/Standards/Generic/Docs/CodeAnalysis/EmptyPHPStatementStandard.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |