Skip to content

Commit 3dd25e1

Browse files
committed
Fix
1 parent 596312a commit 3dd25e1

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ private function shouldSkipCompareBoolToNumeric(Type $leftStaticType, Type $righ
109109
return true;
110110
}
111111

112-
return ! $rightStaticType->isInteger()
112+
if (! $rightStaticType->isInteger()
113+
->no()) {
114+
return true;
115+
}
116+
117+
return ! $rightStaticType->isFloat()
113118
->no();
114119
}
115120

@@ -118,7 +123,12 @@ private function shouldSkipCompareBoolToNumeric(Type $leftStaticType, Type $righ
118123
return true;
119124
}
120125

121-
return ! $leftStaticType->isInteger()
126+
if (! $leftStaticType->isInteger()
127+
->no()) {
128+
return true;
129+
}
130+
131+
return ! $leftStaticType->isFloat()
122132
->no();
123133
}
124134

0 commit comments

Comments
 (0)