Configurable

FunctionArgumentDefaultValueReplacerRector

Streamline the operator arguments of version_compare function

-version_compare(PHP_VERSION, '5.6', 'gte');
+version_compare(PHP_VERSION, '5.6', 'ge');

Configure your rector.php:

<?php

use Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector;
use Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withConfiguredRule(FunctionArgumentDefaultValueReplacerRector::class, [
        new ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'gte', 'ge'),
    ]);
SETS:  PHP 8.0