PHP Classes

File: vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml   Download  
File: vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: Yesterday
Size: 822 bytes
 

Contents

Class file image Download
<?xml version="1.0"?> <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd" title="No Double Negative" > <standard> <![CDATA[ Detects double negation in code, which is effectively the same as a boolean cast, but with a much higher cognitive load. ]]> </standard> <code_comparison> <code title="Valid: using singular negation or a boolean cast."> <![CDATA[ $var = $a && <em>!</em> $b; if(<em>(bool)</em> callMe($a)) {} ]]> </code> <code title="Invalid: using double negation (or more)."> <![CDATA[ $var = $a && <em>! !</em> $b; if(<em>! ! !</em> callMe($a)) {} ]]> </code> </code_comparison> </documentation>