oficinasuport-wp-theme/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/DisallowShortTernaryStandar...

21 lines
520 B
XML

<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>