PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml

Recommend this page to a friend!
  Classes of milenmk   Simple PHP Password Manager   vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Simple PHP Password Manager
Application to store and retrieve user password
Author: By
Last change:
Date: 1 year ago
Size: 578 bytes
 

Contents

Class file image Download
<documentation title="Disallow Yoda conditions"> <standard> <![CDATA[ Yoda conditions are disallowed. ]]> </standard> <code_comparison> <code title="Valid: value to be asserted must go on the right side of the comparison."> <![CDATA[ if ($test === null) <em>{</em> $var = 1; <em>}</em> ]]> </code> <code title="Invalid: value to be asserted must not be on the left."> <![CDATA[ if (null === $test) <em>{</em> $var = 1; <em>}</em> ]]> </code> </code_comparison> </documentation>