InlineIfToExplicitIfRector

Change inline if to explicit if

 class SomeClass
 {
     public function run()
     {
         $userId = null;

-        is_null($userId) && $userId = 5;
+        if (is_null($userId)) {
+            $userId = 5;
+        }
     }
 }

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\Config\RectorConfig;

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