Feature Request
when the expr is non-nullable, ?? should not be used, use ?: instead.
Diff
function run(string $a)
{
- return $a ?? 'foo';
+ return $a ?: 'foo';
}
with ?? notice: https://phpstan.org/r/c97f6f8d-1c56-4b71-8064-0b9fa1ac9c4d
with ?: green: https://phpstan.org/r/307aca11-7797-4928-a675-89bbf7d49f8e
Feature Request
when the expr is non-nullable,
??should not be used, use?:instead.Diff
function run(string $a) { - return $a ?? 'foo'; + return $a ?: 'foo'; }with
??notice: https://phpstan.org/r/c97f6f8d-1c56-4b71-8064-0b9fa1ac9c4dwith
?:green: https://phpstan.org/r/307aca11-7797-4928-a675-89bbf7d49f8e