There is a wrong assumtion that types are same.
<?php
final class DemoFile
{
public function run(int|string|float $firstValue, int|string|float $secondValue)
{
return $firstValue == $secondValue;
}
public function rector(int|string|float $firstValue, int|string|float $secondValue)
{
return $firstValue === $secondValue;
}
}
$demo = new DemoFile();
var_dump($demo->run('0', 0) === $demo->rector('0', 0)); #false
Only change same type compare.
Bug Report
There is a wrong assumtion that types are same.
Minimal PHP Code Causing Issue
See https://getrector.com/demo/686d0b75-53c4-490a-9730-d1a21ffe1b78
Responsible rules
UseIdenticalOverEqualWithSameTypeRectorExpected Behavior
Only change same type compare.