Change assertEquals()/assertSame() method using float on expected argument to new specific alternatives.
-$this->assertSame(10.20, $value);
-$this->assertEquals(10.200, $value);
+$this->assertEqualsWithDelta(10.20, $value, PHP_FLOAT_EPSILON);
+$this->assertEqualsWithDelta(10.200, $value, PHP_FLOAT_EPSILON);
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector;
return RectorConfig::configure()
->withRules([
AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector::class,
]);