Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheap checks first in TypeSpecifier #2103

merged 2 commits into from Dec 13, 2022


Copy link

@staabm staabm commented Dec 13, 2022

No description provided.

|| $exprLeftType instanceof EnumCaseObjectType
|| ($exprLeftType instanceof ConstantType && !$exprRightType->equals($exprLeftType) && $exprRightType->isSuperTypeOf($exprLeftType)->yes())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just moving possible expensive isSuperTypeOf to be evaluated later

@ondrejmirtes ondrejmirtes merged commit 926ec9d into phpstan:1.9.x Dec 13, 2022
378 checks passed
Copy link

Thank you.

@staabm staabm deleted the cheap-first-specifier branch December 13, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants