Bug report
PHPStan does not recognise that all match arms are handled when you use a class union type.
Code snippet that reproduces the problem
https://phpstan.org/r/51d5cd6f-2479-4db6-ae2b-cfae97da918d
Expected output
Since all match arms are covered, no error should happen.
Did PHPStan help you today? Did it make you happy in any way?
Every day!
Bug report
PHPStan does not recognise that all match arms are handled when you use a class union type.
Code snippet that reproduces the problem
https://phpstan.org/r/51d5cd6f-2479-4db6-ae2b-cfae97da918d
Expected output
Since all match arms are covered, no error should happen.
Did PHPStan help you today? Did it make you happy in any way?
Every day!