add support for boolean vs constant boolean type in UseIdenticalOverEqualWithSameTypeRector#7408
add support for boolean vs constant boolean type in UseIdenticalOverEqualWithSameTypeRector#7408TomasVotruba merged 2 commits intomainfrom
Conversation
| { | ||
| public function equal() | ||
| { | ||
| if ($this->getValue() === 'hi') { |
There was a problem hiding this comment.
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.
I created PR:
to skip compare to numeric string.
There was a problem hiding this comment.
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.
I created PR:
to skip compare to integer.
There was a problem hiding this comment.
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.
I created PR:
to skip compare to float.
There was a problem hiding this comment.
I found a better approach by using TypeComparator so the type are both normalized on equal check.
|
👍 |
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
No description provided.