phpstan/phpstan-webmozart-assert

`Assert::notNull()` should warn when argument is never null

Creeperface01 opened this issue · 3 comments

The same issue applies probably to more checks than just this.

In this case $a is never going to be null but phpstan won't show an error

$a = 1;

Assert::notNull($a);

It does. Make sure to install phpstan-strict-rules, or enable this option: https://phpstan.org/config-reference#checkalwaystruechecktypefunctioncall

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.