Refactor func_get_args() in to a variadic param
-function run()
+function run(...$args)
{
- $args = \func_get_args();
}
Configure your rector.php
:
<?php
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
FuncGetArgsToVariadicParamRector::class,
]);