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

 <?php
 
 final class DemoFile
         $this->compareArrays($orig, $new);
     }
 
+    /**
+     * @param mixed|mixed $array1
+     * @param mixed|mixed $array2
+     */
     private function compareArrays(array $array1, array $array2): void
     {
         foreach ($array1 as $key => $value1) {
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 9d02f9 - released at 2026-01-29 17:51