You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only one error that the property is undefined, but the empty() check is correct and PHPStan should not complain about it.
The error Variable $owner in empty() always exists and is not falsy. should not be reported.
Did PHPStan help you today? Did it make you happy in any way?
Not super happy today, as this bug could have resulted in a fatal error on production, because I removed the empty() check. Luckily got caught by automated tests.
Otherwise PHPStan is great, sending love!
The text was updated successfully, but these errors were encountered:
Bug report
When setting
treatPhpDocTypesAsCertain: false
I would expect that PHPStan does not report errors when checking falsy values in if conditions.The User and Resume class is third party code and not under my control to quickly fix(/update.
Code snippet that reproduces the problem
https://phpstan.org/r/c9e0fdba-86d0-4691-8415-09e32a11b31b
Expected output
Only one error that the property is undefined, but the empty() check is correct and PHPStan should not complain about it.
The error
Variable $owner in empty() always exists and is not falsy.
should not be reported.Did PHPStan help you today? Did it make you happy in any way?
Not super happy today, as this bug could have resulted in a fatal error on production, because I removed the empty() check. Luckily got caught by automated tests.
Otherwise PHPStan is great, sending love!
The text was updated successfully, but these errors were encountered: