RemoveDuplicatedArrayKeyRector

Remove duplicated key in defined arrays.

 $item = [
-    1 => 'A',
     1 => 'B'
 ];

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector;

return RectorConfig::configure()
    ->withRules([
        RemoveDuplicatedArrayKeyRector::class,
    ]);
SETS:  Dead Code