-
-
Notifications
You must be signed in to change notification settings - Fork 947
Unreachable switch case #767
Copy link
Copy link
Open
Labels
Description
Summary of a problem or a feature request
It would be great if PHPStan could warn about unreachable case in switch statements.
Code snippet that reproduces the problem
https://phpstan.org/r/78db15fe6bc03244e926868d89e51212
Expected output
Instead of (or in addition to) reporting an undefined variable, report an unreachable case.
This particular example is maybe related to the Constant values milestone, but it could probably be generalized.
Reactions are currently unavailable