Skip to content

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Jan 9, 2023

In the scope of the lazy methods this makes sense to me. But this change won't affect PHPStan at all at the moment, because all lazyAnd() and lazyOr() are called on valid yes or no already. It would lead to an early exit potentially if those methods would be used more dynamically like e.g. TrinaryLogic::createFromBoolean($expression)->lazyAnd(...)

this is covered by already existing tests at least so far that tests would break if the logic is inverted.

@ondrejmirtes ondrejmirtes merged commit 2461a5a into phpstan:1.9.x Jan 9, 2023
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the trinary-logic-lazy-early-exit branch January 9, 2023 12:25
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