Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'"
[lhc/web/wiklou.git] / includes / libs / ObjectFactory.php
index 2ffc1d3..6c47c3c 100644 (file)
@@ -21,8 +21,7 @@
 /**
  * Construct objects from configuration instructions.
  *
- * @author Bryan Davis <bd808@wikimedia.org>
- * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
+ * @copyright © 2014 Wikimedia Foundation and contributors
  */
 class ObjectFactory {
 
@@ -57,7 +56,7 @@ class ObjectFactory {
         * constructor is non-public or non-existent
         */
        public static function getObjectFromSpec( $spec ) {
-               $args = isset( $spec['args'] ) ? $spec['args'] : array();
+               $args = isset( $spec['args'] ) ? $spec['args'] : [];
                $expandArgs = !isset( $spec['closure_expansion'] ) ||
                        $spec['closure_expansion'] === true;
 
@@ -86,7 +85,7 @@ class ObjectFactory {
                                if ( $expandArgs ) {
                                        $margs = static::expandClosures( $margs );
                                }
-                               call_user_func_array( array( $obj, $method ), $margs );
+                               call_user_func_array( [ $obj, $method ], $margs );
                        }
                }