Change array_merge of non arrays to array directly
class SomeClass
{
public function go()
{
$value = 5;
$value2 = 10;
- return array_merge([$value], [$value2]);
+ return [$value, $value2];
}
}
Configure your rector.php
:
<?php
use Rector\CodeQuality\Rector\FuncCall\ArrayMergeOfNonArraysToSimpleArrayRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
ArrayMergeOfNonArraysToSimpleArrayRector::class,
]);