-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Labels
Milestone
Description
Bug report
I have code that gets a divisor out of an array that might or might not exist or might be zero. I'm wrapping that with a try/catch block checking for DivisionByZeroError, but apparently PHPStan doesn't "see" that there is a division occurring with a dynamic divisor.
Code snippet that reproduces the problem
https://phpstan.org/r/ece3fd89-f67b-44ec-9e6a-b7b5c1b77b0e
Expected output
No output.
Did PHPStan help you today? Did it make you happy in any way?
Today, PHPStan has helped me to detect unused properties, making my classes leaner and my code more readable. Thank you!