File "DisallowShortTernaryStandard.xml"

Full Path: /home/warrior1/public_html/wp-content/themes/storefront/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/DisallowShortTernaryStandard.xml
File size: 520 bytes
MIME-type: text/plain
Charset: utf-8

<documentation title="Disallow Short Ternaries">
    <standard>
    <![CDATA[
    The short ternary operator must not be used.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: long ternary.">
        <![CDATA[
$height = ! empty( $data['height'] ) <em>?</em>
    $data['height'] <em>:</em> 0;
        ]]>
        </code>
        <code title="Invalid: short ternary.">
        <![CDATA[
$height = $data['height'] <em>? :</em> 0;
        ]]>
        </code>
    </code_comparison>
</documentation>