phpstan-strict-rules
phpstan-strict-rules copied to clipboard
Rule to prefer !== null check over isset() for existing variable/key/property
When using isset()
we're checking that
- The property/variable/... is defined
- The value is not null
When the value is always defined, it could be clearer to write $foo !== null
instead.
This is somewhat a code sniffer rule already for me. But in PHPStan it would be easier or more correct to check the existence within a scope