2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2022-06-01 07:38:23 +00:00
|
|
|
namespace RectorPrefix20220601;
|
2020-07-18 18:57:24 +02:00
|
|
|
|
2022-04-12 11:52:08 +00:00
|
|
|
use Rector\Config\RectorConfig;
|
2021-09-11 11:01:40 +00:00
|
|
|
use Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
|
|
|
|
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
|
|
|
|
use Rector\Php74\Rector\Double\RealToFloatTypeCastRector;
|
|
|
|
use Rector\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector;
|
|
|
|
use Rector\Php74\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector;
|
|
|
|
use Rector\Php74\Rector\FuncCall\FilterVarToAddSlashesRector;
|
|
|
|
use Rector\Php74\Rector\FuncCall\MbStrrposEncodingArgumentPositionRector;
|
2021-12-27 17:16:09 +00:00
|
|
|
use Rector\Php74\Rector\Function_\ReservedFnFunctionRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
|
|
|
|
use Rector\Php74\Rector\MethodCall\ChangeReflectionTypeToStringToGetNameRector;
|
|
|
|
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
|
|
|
|
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
|
|
|
use Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
2022-05-27 11:51:31 +00:00
|
|
|
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Property\TypedPropertyRector::class);
|
|
|
|
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, [
|
2021-05-09 20:15:43 +00:00
|
|
|
#the_real_type
|
|
|
|
# https://wiki.php.net/rfc/deprecations_php_7_4
|
|
|
|
'is_real' => 'is_float',
|
|
|
|
#apache_request_headers_function
|
|
|
|
# https://wiki.php.net/rfc/deprecations_php_7_4
|
|
|
|
'apache_request_headers' => 'getallheaders',
|
2021-11-30 13:55:08 +00:00
|
|
|
]);
|
2022-05-27 11:51:31 +00:00
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\FilterVarToAddSlashesRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\MbStrrposEncodingArgumentPositionRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Double\RealToFloatTypeCastRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Assign\NullCoalescingOperatorRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\MethodCall\ChangeReflectionTypeToStringToGetNameRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php74\Rector\Function_\ReservedFnFunctionRector::class);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|