From 8678e32b8db50b57178a173ac60e4da3fd89f57c Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 11 Mar 2016 18:41:26 +0100 Subject: Change remaining places to use short array syntax Change-Id: I0785c73a239c11188ad7411c5cd8ed09a2dbc9b3 --- includes/GitInfo.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'includes/GitInfo.php') 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; -- cgit v1.2.3