2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2022-06-08 05:54:40 +00:00
|
|
|
namespace RectorPrefix20220608;
|
2020-07-18 18:57:24 +02:00
|
|
|
|
2022-06-06 17:12:56 +00:00
|
|
|
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;
|
2022-06-07 08:22:29 +00:00
|
|
|
return static function (RectorConfig $rectorConfig) : void {
|
2022-06-07 09:46:15 +00:00
|
|
|
$configuration = [new FuncCallToMethodCall('GuzzleHttp\\json_decode', 'GuzzleHttp\\Utils', 'jsonDecode'), new FuncCallToMethodCall('GuzzleHttp\\get_path', 'GuzzleHttp\\Utils', 'getPath')];
|
2022-06-07 08:22:29 +00:00
|
|
|
$rectorConfig->ruleWithConfiguration(FuncCallToMethodCallRector::class, $configuration);
|
2022-06-07 09:46:15 +00:00
|
|
|
$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')]);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|