Run Rector on your code to see what it can do for you:

-<?php
-
-{
-	is_null($userId) && $userId = 5;
-    
-    {}
-}
-
-{
-	is_null($userId) && $userId = 5;
-    
-    {}
-}
+<?php
+
+if (is_null($userId)) {
+    $userId = 5;
+}
+{
+}
+if (is_null($userId)) {
+    $userId = 5;
+}
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 0a5ae8 - released at 2026-01-22 00:58