Change configured function calls to new Instance
class SomeClass
{
public function run()
{
- $array = collection([]);
+ $array = new \Collection([]);
}
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Transform\Rector\FuncCall\FuncCallToNewRector;
return RectorConfig::configure()
->withConfiguredRule(FuncCallToNewRector::class, [
'collection' => 'Collection',
]);