Open
Description
Disallow short ternary operator (?:) - implies weak comparison, it's recommended to use null coalesce operator (??) or ternary operator with strict condition.
It is not the case if the left value is always boolean, right?
$a = false; // boolean
$b = $a ?: null; // much more readable than
$c = $a !== false ? true : null;
Metadata
Metadata
Assignees
Labels
No labels