X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FRepoGroup.php;h=89287af0bd424d629059a78d28bd22a8a9118c05;hb=e1630b6a53c40ed1cd377338944765e0d68a2981;hp=24d1ab2efefb8baf02bbbbe60a6d86ac05261e77;hpb=77e3624caba072521fbc1826af2d47f9b29f4032;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 24d1ab2efe..89287af0bd 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -140,7 +140,7 @@ class RepoGroup { && empty( $options['private'] ) && empty( $options['latest'] ) ) { - $time = isset( $options['time'] ) ? $options['time'] : ''; + $time = $options['time'] ?? ''; if ( $this->cache->has( $dbkey, $time, 60 ) ) { return $this->cache->get( $dbkey, $time ); } @@ -163,7 +163,7 @@ class RepoGroup { } } - $image = $image ? $image : false; // type sanity + $image = $image ?: false; // type sanity # Cache file existence or non-existence if ( $useCache && ( !$image || $image->isCacheable() ) ) { $this->cache->set( $dbkey, $time, $image ); @@ -372,8 +372,7 @@ class RepoGroup { $this->initialiseRepos(); } foreach ( $this->foreignRepos as $repo ) { - $args = array_merge( [ $repo ], $params ); - if ( call_user_func_array( $callback, $args ) ) { + if ( $callback( $repo, ...$params ) ) { return true; } } @@ -423,7 +422,7 @@ class RepoGroup { * Split a virtual URL into repo, zone and rel parts * @param string $url * @throws MWException - * @return array Containing repo, zone and rel + * @return string[] Containing repo, zone and rel */ function splitVirtualUrl( $url ) { if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {