Avoid using array_map in ExtensionRegistry and ExtensionProcessor for simple operations
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index bc2f8e4..994de97 100644 (file)
@@ -413,13 +413,14 @@ class ExtensionRegistry {
         * Fully expand autoloader paths
         *
         * @param string $dir
-        * @param array $info
+        * @param array $files
         * @return array
         */
-       protected function processAutoLoader( $dir, array $info ) {
+       protected function processAutoLoader( $dir, array $files ) {
                // Make paths absolute, relative to the JSON file
-               return array_map( function ( $file ) use ( $dir ) {
-                       return "$dir/$file";
-               }, $info );
+               foreach ( $files as &$file ) {
+                       $file = "$dir/$file";
+               }
+               return $files;
        }
 }