Skip to content

Commit 8d1b29d

Browse files
committed
[ci-review] Rector Rectify
1 parent 655c71c commit 8d1b29d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,17 @@ private function shouldSkipCompareBoolToNumeric(Type $leftStaticType, Type $righ
105105
{
106106
// use ! ->no() as to verify both yes and maybe
107107
if ($leftStaticType instanceof BooleanType) {
108-
return ! $rightStaticType->isNumericString()->no() || ! $rightStaticType->isInteger()->no() ;
108+
if (! $rightStaticType->isNumericString()->no()) {
109+
return true;
110+
}
111+
return ! $rightStaticType->isInteger()->no();
109112
}
110113

111114
if ($rightStaticType instanceof BooleanType) {
112-
return ! $leftStaticType->isNumericString()->no() || ! $leftStaticType->isInteger()->no();
115+
if (! $leftStaticType->isNumericString()->no()) {
116+
return true;
117+
}
118+
return ! $leftStaticType->isInteger()->no();
113119
}
114120

115121
return false;

0 commit comments

Comments
 (0)