From 2fcd7dbf7ce7bfc8912078f38d98563dd0766569 Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 13 Apr 2012 04:10:24 +0100 Subject: [PATCH] Fixup/finish off function parameter documentation Remove unused variable Change-Id: I9b19388ded628c170d10ac371882a4debd845ea8 --- includes/GitInfo.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/GitInfo.php b/includes/GitInfo.php index 49539659a4..0dfd48dff2 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -34,7 +34,7 @@ class GitInfo { ); /** - * @param $dir The root directory of the repo where the .git dir can be found + * @param $dir string The root directory of the repo where the .git dir can be found */ public function __construct( $dir ) { $this->basedir = "{$dir}/.git/"; @@ -55,7 +55,7 @@ class GitInfo { /** * Check if a string looks like a hex encoded SHA1 hash * - * @param $str The string to check + * @param $str string The string to check * @return bool Whether or not the string looks like a SHA1 */ public static function isSHA1( $str ) { @@ -121,7 +121,7 @@ class GitInfo { /** * Get an URL to a web viewer link to the HEAD revision. * - * @return string|false string if an URL is available or false otherwise. + * @return string|bool string if an URL is available or false otherwise. */ public function getHeadViewUrl() { $config = "{$this->basedir}/config"; @@ -152,7 +152,6 @@ class GitInfo { $url .= '.git'; } foreach( $this->viewers as $repo => $viewer ) { - $m = array(); $pattern = '#^' . $repo . '$#'; if ( preg_match( $pattern, $url ) ) { $viewerUrl = preg_replace( $pattern, $viewer, $url ); @@ -169,6 +168,7 @@ class GitInfo { /** * @see self::getHeadSHA1 + * @return string */ public static function headSHA1() { return self::repo()->getHeadSHA1(); @@ -176,6 +176,7 @@ class GitInfo { /** * @see self::getCurrentBranch + * @return string */ public static function currentBranch() { return self::repo()->getCurrentBranch(); @@ -183,6 +184,7 @@ class GitInfo { /** * @see self::getHeadViewUrl() + * @return bool|string */ public static function headViewUrl() { return self::repo()->getHeadViewUrl(); -- 2.20.1