Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Nov 22, 2023

@staabm staabm marked this pull request as ready for review November 22, 2023 08:44
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

}

if ($functionReflection->getName() === 'enum_exists') {
return $this->typeSpecifier->create(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please less code duplication here. The only thing different is the type argument.

@ondrejmirtes ondrejmirtes merged commit de2b200 into phpstan:1.10.x Nov 25, 2023
@ondrejmirtes
Copy link
Member

Thank you.

@ZejdCicak
Copy link

This makes enum_exists always treat an enum as UnitEnum, and never as BackedEnum, do you think there is a way to deal with this in library?

@ondrejmirtes
Copy link
Member

@ZejdCicak Please open a new issue with a reproducing snippet of your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants