Skip to content

fix *never* type for more operators#1649

Merged
ondrejmirtes merged 5 commits into
phpstan:1.8.xfrom
staabm:never-ops
Aug 25, 2022
Merged

fix *never* type for more operators#1649
ondrejmirtes merged 5 commits into
phpstan:1.8.xfrom
staabm:never-ops

Conversation

@staabm

@staabm staabm commented Aug 25, 2022

Copy link
Copy Markdown
Contributor

inspired by #1641 and #1579 (comment)

//cc @herndlm

Comment on lines 671 to 679

@herndlm herndlm Aug 25, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what do you think of also calling them $leftType and $rightType instead of $callbackLeftType and $callbackRightType? I think then it would be consistent with other methods from here

@staabm staabm Aug 25, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it collides with a already same named variable in the loop below (therefore I went with callbackLeftType, as I used $leftType before and phpstan reported same named variables ;))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah ok, I missed that

@staabm
staabm marked this pull request as ready for review August 25, 2022 08:54
@ondrejmirtes
ondrejmirtes merged commit 992e7a4 into phpstan:1.8.x Aug 25, 2022
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

@staabm
staabm deleted the never-ops branch August 25, 2022 12:57
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