-
-
Notifications
You must be signed in to change notification settings - Fork 416
add support for boolean vs constant boolean type in UseIdenticalOverEqualWithSameTypeRector #7408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| { | ||
| public function equal() | ||
| { | ||
| if ($this->getValue() === 'hi') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this cause regression on numeric string "1", see https://3v4l.org/JEeP5
I will create PR to skip numeric string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created PR:
to skip compare to numeric string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found another regression that it cause invalid result on integer 0 vs false, see https://3v4l.org/Pp8Vr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created PR:
to skip compare to integer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found another regression that it cause invalid result on float vs bool, see https://3v4l.org/I3GQS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created PR:
to skip compare to float.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a better approach by using TypeComparator so the type are both normalized on equal check.
|
👍 |
No description provided.