Fixup/finish off function parameter documentation
authorReedy <reedy@wikimedia.org>
Fri, 13 Apr 2012 03:10:24 +0000 (04:10 +0100)
committerReedy <reedy@wikimedia.org>
Fri, 13 Apr 2012 03:10:46 +0000 (04:10 +0100)
Remove unused variable

Change-Id: I9b19388ded628c170d10ac371882a4debd845ea8

includes/GitInfo.php

index 4953965..0dfd48d 100644 (file)
@@ -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();