mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
e6e5895517
[Naming] Skip used in arrow function args on RenameVariableToMatchMethodCallReturnTypeRector (#2599)
19 lines
1.2 KiB
PHP
19 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix202207;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
|
use Rector\Transform\Rector\FuncCall\FuncCallToMethodCallRector;
|
|
use Rector\Transform\Rector\StaticCall\StaticCallToFuncCallRector;
|
|
use Rector\Transform\ValueObject\FuncCallToMethodCall;
|
|
use Rector\Transform\ValueObject\StaticCallToFuncCall;
|
|
return static function (RectorConfig $rectorConfig) : void {
|
|
$configuration = [new FuncCallToMethodCall('GuzzleHttp\\json_decode', 'GuzzleHttp\\Utils', 'jsonDecode'), new FuncCallToMethodCall('GuzzleHttp\\get_path', 'GuzzleHttp\\Utils', 'getPath')];
|
|
$rectorConfig->ruleWithConfiguration(FuncCallToMethodCallRector::class, $configuration);
|
|
$rectorConfig->ruleWithConfiguration(StaticCallToFuncCallRector::class, [new StaticCallToFuncCall('GuzzleHttp\\Utils', 'setPath', 'GuzzleHttp\\set_path'), new StaticCallToFuncCall('GuzzleHttp\\Pool', 'batch', 'GuzzleHttp\\Pool\\batch')]);
|
|
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [new MethodCallRename('GuzzleHttp\\Message\\MessageInterface', 'getHeaderLines', 'getHeaderAsArray')]);
|
|
};
|