Change array_push() to direct variable assign
$items = [];
-array_push($items, $item);
+$items[] = $item;
Configure your rector.php
:
<?php
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
ChangeArrayPushToArrayAssignRector::class,
]);