UnsetCastRector

Removes (unset) cast

-$different = (unset) $value;
+$different = null;

-$value = (unset) $value;
+unset($value);

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php72\Rector\Unset_\UnsetCastRector;

return RectorConfig::configure()
    ->withRules([
        UnsetCastRector::class,
    ]);
SETS:  PHP 7.2