X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FMemoizedCallable.php;h=50e9732b80bf3cbdd81a1824ac9a4091f1aae402;hb=0421ab1e9eda6e22ba9a12c73dbb969c337ed9e9;hp=14de6b903455719ff62cb8d3bf5d4bc345799b60;hpb=376879ee06871beb31ca540bbcc87843aa2fb744;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/MemoizedCallable.php b/includes/libs/MemoizedCallable.php index 14de6b9034..50e9732b80 100644 --- a/includes/libs/MemoizedCallable.php +++ b/includes/libs/MemoizedCallable.php @@ -102,7 +102,7 @@ class MemoizedCallable { * @param array $args Parameters for memoized function or method. * @return mixed The memoized callable's return value. */ - public function invokeArgs( Array $args = array() ) { + public function invokeArgs( array $args = [] ) { foreach ( $args as $arg ) { if ( $arg !== null && !is_scalar( $arg ) ) { throw new InvalidArgumentException( @@ -144,7 +144,7 @@ class MemoizedCallable { * @param array $args * @param int $ttl */ - public static function call( $callable, Array $args = array(), $ttl = 3600 ) { + public static function call( $callable, array $args = [], $ttl = 3600 ) { $instance = new self( $callable, $ttl ); return $instance->invokeArgs( $args ); }