Find the best Rector rule to solve your problem


Configurable

RenameFunctionRector

Turns defined function call new one.

-view("...", []);
+Laravel\Templating\render("...", []);

RemoveReferenceFromCallRector

Remove & from function and method calls

 final class SomeClass
 {
     public function run($one)
     {
-        return strlen(&$one);
+        return strlen($one);
     }
 }
SETS:  PHP 5.4

RemoveZeroBreakContinueRector

Remove 0 from break and continue

 class SomeClass
 {
     public function run($random)
     {
-        continue 0;
-        break 0;
+        continue;
+        break;

         $five = 5;
-        continue $five;
+        continue 5;

-        break $random;
+        break;
     }
 }
SETS:  PHP 5.4

LongArrayToShortArrayRector

Long array to short array

 class SomeClass
 {
     public function run()
     {
-        return array();
+        return [];
     }
 }
SETS:  PHP 5.4