wishthis/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml

26 lines
760 B
XML
Raw Normal View History

2023-09-19 17:26:46 +00:00
<?xml version="1.0"?>
<documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
title="Uppercase Magic Constants"
>
<standard>
<![CDATA[
The PHP native `__...__` magic constant should be in uppercase.
]]>
</standard>
<code_comparison>
<code title="Valid: using uppercase.">
<![CDATA[
echo <em>__LINE__</em>;
include <em>__DIR__</em> . '/file.php';
]]>
</code>
<code title="Invalid: using lowercase or mixed case.">
<![CDATA[
echo <em>__NameSpace__</em>;
include dirname(<em>__file__</em>) . '/file.php';
]]>
</code>
</code_comparison>
</documentation>