Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Jan 1, 2026

No description provided.

if ($certainty->no()) {
unset($scope->expressionTypes[$conditionalExprString]);
} else {
$type = TypeCombinator::intersect(...array_map(static fn (ConditionalExpressionHolder $holder) => $holder->getTypeHolder()->getType(), $expressions));
Copy link
Contributor Author

@staabm staabm Jan 1, 2026

Choose a reason for hiding this comment

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

this type was always calculated but only used in the IF-THEN case

@ondrejmirtes ondrejmirtes merged commit fd518b2 into phpstan:2.1.x Jan 1, 2026
632 of 640 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the les-work2 branch January 1, 2026 11:14
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.

2 participants