RecastingRemovalRector

Removes recasting of the same type

 $string = '';
-$string = (string) $string;
+$string = $string;

 $array = [];
-$array = (array) $array;
+$array = $array;

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;

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