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
An array of Enum reflection objects, one for each case in the Enum. For a Unit Enum, they will all be instances of ReflectionEnumUnitCase. For a Backed Enum, they will all be instances of ReflectionEnumBackedCase.
The closure should expect ReflectionEnumBackedCase|ReflectionEnumUnitCase or in case of checked isBackend; only ReflectionEnumBackedCase
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered:
Ferror
changed the title
ReflectionEnum::getCases expects ReflectionEnumUnitCase instead of
ReflectionEnum::getCases expects ReflectionEnumUnitCase instead of ReflectionEnumBackedCase
Nov 26, 2023
Bug report
PHP Docs: https://www.php.net/manual/en/reflectionenum.getcases.php
An array of Enum reflection objects, one for each case in the Enum. For a Unit Enum, they will all be instances of ReflectionEnumUnitCase. For a Backed Enum, they will all be instances of ReflectionEnumBackedCase.
Code snippet that reproduces the problem
https://phpstan.org/r/e14b0cbd-6eec-4b86-ba0e-10e9cc324b47
Expected output
The closure should expect ReflectionEnumBackedCase|ReflectionEnumUnitCase or in case of checked isBackend; only ReflectionEnumBackedCase
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: