Renames mktime() without arguments to time()
class SomeClass
{
public function run()
{
$time = mktime(1, 2, 3);
- $nextTime = mktime();
+ $nextTime = time();
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php70\Rector\FuncCall\RenameMktimeWithoutArgsToTimeRector;
return RectorConfig::configure()
->withRules([
RenameMktimeWithoutArgsToTimeRector::class,
]);