Inspectopedia Help

Pointless boolean expression inside 'if' condition

Reports the boolean expressions inside if conditions that contain $expr == true or $expr == false. Such expressions can be simplified to if($expr) and if(!expr).

Inspection Details

Available in:

PhpStorm 2023.3, Qodana for PHP 2023.3

Plugin:

PHP, 233.SNAPSHOT

Last modified: 13 July 2023