Change 2 standalone assigns to variable then binary op to direct binary op
function run()
{
- $value = 100;
- $anotherValue = 200;
-
return 100 <=> 200;
}
Configure your rector.php
:
<?php
use Rector\CodingStyle\Rector\ClassMethod\BinaryOpStandaloneAssignsToDirectRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
BinaryOpStandaloneAssignsToDirectRector::class,
]);