Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 2, 2024

@ondrejmirtes
Copy link
Member

I think you can narrow all of them as != false.

Because here you missed '0' which is falsy.

@staabm
Copy link
Contributor Author

staabm commented Sep 2, 2024

I think you can narrow all of them as != false.

great suggestion. since we have already a better loose comparison of constant bools, this also leads to more precise results already :)

@staabm
Copy link
Contributor Author

staabm commented Sep 2, 2024

(I will de-duplicate the existing logic on the next PR, when currently open ones are merged)

@staabm staabm marked this pull request as ready for review September 2, 2024 08:04
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 3d17f51 into phpstan:1.12.x Sep 2, 2024
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the cast3 branch September 2, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants