2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2022-05-11 00:39:05 +00:00
|
|
|
namespace RectorPrefix20220511;
|
2020-07-18 18:57:24 +02:00
|
|
|
|
2022-04-12 11:52:08 +00:00
|
|
|
use Rector\Config\RectorConfig;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Php72\Rector\Assign\ListEachRector;
|
|
|
|
use Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector;
|
|
|
|
use Rector\Php72\Rector\FuncCall\GetClassOnNullRector;
|
|
|
|
use Rector\Php72\Rector\FuncCall\IsObjectOnIncompleteClassRector;
|
|
|
|
use Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector;
|
|
|
|
use Rector\Php72\Rector\FuncCall\StringifyDefineRector;
|
|
|
|
use Rector\Php72\Rector\FuncCall\StringsAssertNakedRector;
|
|
|
|
use Rector\Php72\Rector\Unset_\UnsetCastRector;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Php72\Rector\While_\WhileEachToForeachRector;
|
|
|
|
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
2022-04-12 11:52:08 +00:00
|
|
|
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
2022-04-20 18:29:39 +00:00
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\While_\WhileEachToForeachRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\Assign\ListEachRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\Unset_\UnsetCastRector::class);
|
|
|
|
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, [
|
2021-05-09 20:15:43 +00:00
|
|
|
# and imagewbmp
|
|
|
|
'jpeg2wbmp' => 'imagecreatefromjpeg',
|
|
|
|
# or imagewbmp
|
|
|
|
'png2wbmp' => 'imagecreatefrompng',
|
|
|
|
#migration72.deprecated.gmp_random-function
|
|
|
|
# http://php.net/manual/en/migration72.deprecated.php
|
|
|
|
# or gmp_random_range
|
|
|
|
'gmp_random' => 'gmp_random_bits',
|
|
|
|
'read_exif_data' => 'exif_read_data',
|
2021-11-30 13:55:08 +00:00
|
|
|
]);
|
2022-04-20 18:29:39 +00:00
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\IsObjectOnIncompleteClassRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\StringsAssertNakedRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
|
|
|
|
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|