-
-
Couldn't load subscription status.
- Fork 933
Closed
phpstan/phpstan-src
#4129Labels
Milestone
Description
Bug report
If you call count on a SplObjectStorage before calling SplObjectStorage::removeAll then on subsequent if (count() === 0) calls PHPStan report an error that this check will always be false. Calling removeAll might change the contents. Same problem with removeAllExcept calls.
Strict comparison using === between int<1, max> and 0 will always evaluate to false. Code snippet that reproduces the problem
https://phpstan.org/r/69cf4869-d279-4876-977c-468f3f5d94a9
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
PHPStan helps me alot and makes me happy. :-)