X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FObjectFactory.php;h=6c47c3cafa4ee714a3b8509f2a56deb786459e66;hb=9ad1724f6babfc8fc534171b63cbfd39d5b580d6;hp=2ffc1d3be84da9ff88e641854c0b51bfaba9abce;hpb=8b0a2d80e08895b9d65e2e713cb1c00b99eb268e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/ObjectFactory.php b/includes/libs/ObjectFactory.php index 2ffc1d3be8..6c47c3cafa 100644 --- a/includes/libs/ObjectFactory.php +++ b/includes/libs/ObjectFactory.php @@ -21,8 +21,7 @@ /** * Construct objects from configuration instructions. * - * @author Bryan Davis - * @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 ); } }