aboutsummaryrefslogtreecommitdiffstats
path: root/includes/GitInfo.php
diff options
context:
space:
mode:
authorumherirrender <umherirrender_de.wp@web.de>2016-03-11 18:41:26 +0100
committerumherirrender <umherirrender_de.wp@web.de>2016-03-11 18:41:26 +0100
commit8678e32b8db50b57178a173ac60e4da3fd89f57c (patch)
tree134a0b4aacf54f445c2d915b3ada370a51cb7e2a /includes/GitInfo.php
parent989feebb73352d690adbdc7a94fce8245cb78882 (diff)
downloadmediawikicore-8678e32b8db50b57178a173ac60e4da3fd89f57c.tar.gz
mediawikicore-8678e32b8db50b57178a173ac60e4da3fd89f57c.zip
Change remaining places to use short array syntax
Change-Id: I0785c73a239c11188ad7411c5cd8ed09a2dbc9b3
Diffstat (limited to 'includes/GitInfo.php')
-rw-r--r--includes/GitInfo.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index 14f3cc14afee..29516ab7cd94 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -43,7 +43,7 @@ class GitInfo {
/**
* Cached git information.
*/
- protected $cache = array();
+ protected $cache = [];
/**
* Map of repo URLs to viewer URLs. Access via static method getViewers().
@@ -215,7 +215,7 @@ class GitInfo {
is_executable( $wgGitBin ) &&
$this->getHead() !== false
) {
- $environment = array( "GIT_DIR" => $this->basedir );
+ $environment = [ "GIT_DIR" => $this->basedir ];
$cmd = wfEscapeShellArg( $wgGitBin ) .
" show -s --format=format:%ct HEAD";
$retc = false;
@@ -265,11 +265,11 @@ class GitInfo {
if ( preg_match( $pattern, $url, $matches ) ) {
$viewerUrl = preg_replace( $pattern, $viewer, $url );
$headSHA1 = $this->getHeadSHA1();
- $replacements = array(
+ $replacements = [
'%h' => substr( $headSHA1, 0, 7 ),
'%H' => $headSHA1,
'%r' => urlencode( $matches[1] ),
- );
+ ];
return strtr( $viewerUrl, $replacements );
}
}
@@ -396,7 +396,7 @@ class GitInfo {
if ( self::$viewers === false ) {
self::$viewers = $wgGitRepositoryViewers;
- Hooks::run( 'GitViewers', array( &self::$viewers ) );
+ Hooks::run( 'GitViewers', [ &self::$viewers ] );
}
return self::$viewers;