X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FStubObject.php;h=4abc283299abef61997cc0a8396e9b9a2686f957;hb=8dca366e1135877b86cfacabf0ccb1bb4cd507ab;hp=49155d6d996b75fda6b9caf16992f5cbb96aa0bd;hpb=4618f70793d1178ca4c646ef397cf17b1cc70b44;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/StubObject.php b/includes/StubObject.php index 49155d6d99..4abc283299 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -58,7 +58,7 @@ class StubObject { * @param string $class Name of the class of the real object. * @param array $params Parameters to pass to constructor of the real object. */ - public function __construct( $global = null, $class = null, $params = array() ) { + public function __construct( $global = null, $class = null, $params = [] ) { $this->global = $global; $this->class = $class; $this->params = $params; @@ -102,7 +102,7 @@ class StubObject { */ public function _call( $name, $args ) { $this->_unstub( $name, 5 ); - return call_user_func_array( array( $GLOBALS[$this->global], $name ), $args ); + return call_user_func_array( [ $GLOBALS[$this->global], $name ], $args ); } /** @@ -110,11 +110,11 @@ class StubObject { * @return object */ public function _newObject() { - return ObjectFactory::getObjectFromSpec( array( + return ObjectFactory::getObjectFromSpec( [ 'class' => $this->class, 'args' => $this->params, 'closure_expansion' => false, - ) ); + ] ); } /**