noverify
noverify copied to clipboard
Handling of !isset (and probably !empty, etc.)
Code Example
<?php
if (!isset($x)) {
// Not important.
} else {
var_dump($x); // <--
}
Actual Behavior
Warning about undefined var.
Expected Behavior
No warnings.
Found this code pattern in Yii2 framework. Real code:
if (!isset($all)) {
$all = $name;
} else {
throw new Exception("Only one target can have empty 'depends' option. Found two now: $all, $name");
}