Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 1, 2025

while working on #4395 I realized there is a low hanging fruit by getting rid of instanceof ConstantIntegerType

@staabm staabm marked this pull request as ready for review October 1, 2025 12:59
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

continue;
}

$optValueType = TypeCombinator::union($optValueType, $valueType);
Copy link
Member

Choose a reason for hiding this comment

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

It'd be more performant to call ::union just once once we gather all the types to union.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here you are

@ondrejmirtes ondrejmirtes merged commit f1d4c64 into phpstan:2.1.x Oct 6, 2025
544 of 549 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the curl-type branch October 6, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants