IfToSpaceshipRector

Changes if/else to spaceship <=> where useful

 usort($languages, function ($first, $second) {
-if ($first[0] === $second[0]) {
-    return 0;
-}
-
-return ($first[0] < $second[0]) ? 1 : -1;
+return $second[0] <=> $first[0];
 });

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php70\Rector\If_\IfToSpaceshipRector;

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