RemoveUnusedVariableAssignRector

Remove unused assigns to variables

 class SomeClass
 {
     public function run()
     {
-        $value = 5;
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;

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