Closed ondrejmirtes closed 10 months ago
Wait, did this pass before because self
is a subtype of object
? Sounds like we never call this API in our tests? 🤔
@Ocramius It's fine even when called because the method always throws...
Waiting for CI, then shipping this 👍
Thanks @ondrejmirtes!
PHP does not complain about this (because parent has
object
return type) but it's wrong. I found out about it after introducing generics to ReflectionEnum: https://github.com/phpstan/phpstan-src/commit/9ce8faf53c7a78c7887a2c33f9d34944605d6aae