-
-
Notifications
You must be signed in to change notification settings - Fork 943
Closed
Labels
Milestone
Description
Bug report
When using enums to decide on method/function call results we get errors if case-fallthroughs (declaring consecutive cases so the same code is run for more than one) are used.
The snippet shows two methods, "intentional_fallthrough" and "no fallthrough" that are semantically equivalent but the fallthrough one is flagged as an error.
Code snippet that reproduces the problem
https://phpstan.org/r/570727d3-1e16-405c-8f0f-88743399e4e6
Expected output
We would expect the error if a case is missing, but not if all cases are taken into account.
Did PHPStan help you today? Did it make you happy in any way?
It's very early today, but PHPStan did already help :).
Reactions are currently unavailable