Ricordisamoa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/286271

Change subject: Fix and standardize Doxygen tags
......................................................................

Fix and standardize Doxygen tags

* Use "@param datatype $paramname description" format

* String → string, Integer → int etc.

* @return $string → @return string

Change-Id: I860d222382cb4c5699d313b0600bd22503c8c385
---
M includes/EditPage.php
M includes/api/ApiQueryImageInfo.php
M includes/compat/normal/UtfNormalUtil.php
M includes/libs/CSSMin.php
M includes/media/GIF.php
M includes/media/PNG.php
M includes/media/TransformationalImageHandler.php
M includes/password/PasswordPolicyChecks.php
M includes/resourceloader/ResourceLoaderSkinModule.php
M includes/search/SearchEngine.php
M includes/specialpage/QueryPage.php
M includes/specials/SpecialMediaStatistics.php
M tests/phpunit/includes/MergeHistoryTest.php
M tests/phpunit/includes/media/GIFTest.php
M tests/phpunit/includes/media/MediaHandlerTest.php
M tests/phpunit/includes/media/PNGTest.php
16 files changed, 53 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/286271/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 3522531..8f6b202 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3777,7 +3777,7 @@
         * Shows a bulletin board style toolbar for common editing functions.
         * It can be disabled in the user preferences.
         *
-        * @param $title Title object for the page being edited (optional)
+        * @param Title $title Title object for the page being edited (optional)
         * @return string
         */
        static function getEditToolbar( $title = null ) {
diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index 13e6340..d1fcfa3 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -325,8 +325,8 @@
         * allows us to catch certain error conditions early (such as missing
         * required parameter).
         *
-        * @param $image File
-        * @param $finalParams array List of parameters to transform image with
+        * @param File $image
+        * @param array $finalParams List of parameters to transform image with
         */
        protected function checkParameterNormalise( $image, $finalParams ) {
                $h = $image->getHandler();
diff --git a/includes/compat/normal/UtfNormalUtil.php 
b/includes/compat/normal/UtfNormalUtil.php
index 0bc8d0f..8791e4c 100644
--- a/includes/compat/normal/UtfNormalUtil.php
+++ b/includes/compat/normal/UtfNormalUtil.php
@@ -30,8 +30,8 @@
 /**
  * Return UTF-8 sequence for a given Unicode code point.
  *
- * @param $codepoint Integer:
- * @return String
+ * @param int $codepoint
+ * @return string
  * @throws InvalidArgumentException if fed out of range data.
  * @public
  * @deprecated since 1.25, use UtfNormal\Utils directly
@@ -45,8 +45,8 @@
  * Unicode code points and return a UTF-8 string composed of those
  * characters. Used by UTF-8 data generation and testing routines.
  *
- * @param $sequence String
- * @return String
+ * @param string $sequence
+ * @return string
  * @throws InvalidArgumentException if fed out of range data.
  * @private
  * @deprecated since 1.25, use UtfNormal\Utils directly
@@ -77,8 +77,8 @@
  * Determine the Unicode codepoint of a single-character UTF-8 sequence.
  * Does not check for invalid input data.
  *
- * @param $char String
- * @return Integer
+ * @param string $char
+ * @return int
  * @public
  * @deprecated since 1.25, use UtfNormal\Utils directly
  */
diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index 2f2faed..6e40f4c 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -172,7 +172,7 @@
        }
 
        /**
-        * @param $file string
+        * @param string $file
         * @return bool|string
         */
        public static function getMimeType( $file ) {
diff --git a/includes/media/GIF.php b/includes/media/GIF.php
index 8ec7298..5f23855 100644
--- a/includes/media/GIF.php
+++ b/includes/media/GIF.php
@@ -193,7 +193,7 @@
         *
         * Shown in the &query=imageinfo&iiprop=size api query.
         *
-        * @param $file File
+        * @param File $file
         * @return float The duration of the file.
         */
        public function getLength( $file ) {
diff --git a/includes/media/PNG.php b/includes/media/PNG.php
index f9af101..8a3e001 100644
--- a/includes/media/PNG.php
+++ b/includes/media/PNG.php
@@ -180,7 +180,7 @@
         *
         * Shown in the &query=imageinfo&iiprop=size api query.
         *
-        * @param $file File
+        * @param File $file
         * @return float The duration of the file.
         */
        public function getLength( $file ) {
diff --git a/includes/media/TransformationalImageHandler.php 
b/includes/media/TransformationalImageHandler.php
index f1f2161..3287fac 100644
--- a/includes/media/TransformationalImageHandler.php
+++ b/includes/media/TransformationalImageHandler.php
@@ -288,9 +288,9 @@
        /**
         * Get the source file for the transform
         *
-        * @param $file File
-        * @param $params Array
-        * @return Array Array with keys  width, height and path.
+        * @param File $file
+        * @param array $params
+        * @return array Array with keys  width, height and path.
         */
        protected function getThumbnailSource( $file, $params ) {
                return $file->getThumbnailSource( $params );
diff --git a/includes/password/PasswordPolicyChecks.php 
b/includes/password/PasswordPolicyChecks.php
index 7ea87c3..d7aee5b 100644
--- a/includes/password/PasswordPolicyChecks.php
+++ b/includes/password/PasswordPolicyChecks.php
@@ -117,11 +117,11 @@
        /**
         * Ensure that password isn't in top X most popular passwords
         *
-        * @param $policyVal int Cut off to use. Will automatically shrink to 
the max
+        * @param int $policyVal Cut off to use. Will automatically shrink to 
the max
         *   supported for error messages if set to more than max number of 
passwords on file,
         *   so you can use the PHP_INT_MAX constant here safely.
-        * @param $user User
-        * @param $password String
+        * @param User $user
+        * @param string $password
         * @since 1.27
         * @return Status
         */
diff --git a/includes/resourceloader/ResourceLoaderSkinModule.php 
b/includes/resourceloader/ResourceLoaderSkinModule.php
index 490a4ab..91e63e7 100644
--- a/includes/resourceloader/ResourceLoaderSkinModule.php
+++ b/includes/resourceloader/ResourceLoaderSkinModule.php
@@ -26,7 +26,7 @@
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
@@ -68,7 +68,7 @@
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
@@ -78,7 +78,7 @@
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string: Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index be5ab92..27b6dd4 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -380,7 +380,7 @@
         * Makes search simple string if it was namespaced.
         * Sets namespaces of the search to namespaces extracted from string.
         * @param string $search
-        * @return $string Simplified search string
+        * @return string Simplified search string
         */
        protected function normalizeNamespaces( $search ) {
                // Find a Title which is not an interwiki and is in NS_MAIN
diff --git a/includes/specialpage/QueryPage.php 
b/includes/specialpage/QueryPage.php
index 2523810..1beac43 100644
--- a/includes/specialpage/QueryPage.php
+++ b/includes/specialpage/QueryPage.php
@@ -513,8 +513,8 @@
         * What is limit to fetch from DB
         *
         * Used to make it appear the DB stores less results then it actually 
does
-        * @param $uiLimit int Limit from UI
-        * @param $uiOffset int Offset from UI
+        * @param int $uiLimit Limit from UI
+        * @param int $uiOffset Offset from UI
         * @return int Limit to use for DB (not including extra row to see if 
at end)
         */
        protected function getDBLimit( $uiLimit, $uiOffset ) {
diff --git a/includes/specials/SpecialMediaStatistics.php 
b/includes/specials/SpecialMediaStatistics.php
index 8ba90a6..e51e8b5 100644
--- a/includes/specials/SpecialMediaStatistics.php
+++ b/includes/specials/SpecialMediaStatistics.php
@@ -109,12 +109,12 @@
        /**
         * Output the results of the query.
         *
-        * @param $out OutputPage
-        * @param $skin Skin (deprecated presumably)
-        * @param $dbr IDatabase
-        * @param $res ResultWrapper Results from query
-        * @param $num integer Number of results
-        * @param $offset integer Paging offset (Should always be 0 in our case)
+        * @param OutputPage $out
+        * @param Skin $skin (deprecated presumably)
+        * @param IDatabase $dbr
+        * @param ResultWrapper $res Results from query
+        * @param int $num Number of results
+        * @param int $offset Paging offset (Should always be 0 in our case)
         */
        protected function outputResults( $out, $skin, $dbr, $res, $num, 
$offset ) {
                $prevMediaType = null;
@@ -168,9 +168,9 @@
        /**
         * Output a row of the stats table
         *
-        * @param $mime String mime type (e.g. image/jpeg)
-        * @param $count integer Number of images of this type
-        * @param $totalBytes integer Total space for images of this type
+        * @param string $mime mime type (e.g. image/jpeg)
+        * @param int $count Number of images of this type
+        * @param int $totalBytes Total space for images of this type
         */
        protected function outputTableRow( $mime, $count, $bytes ) {
                $mimeSearch = SpecialPage::getTitleFor( 'MIMEsearch', $mime );
@@ -230,8 +230,8 @@
        /**
         * Given a mime type, return a comma separated list of allowed 
extensions.
         *
-        * @param $mime String mime type
-        * @return String Comma separated list of allowed extensions (e.g. 
".ogg, .oga")
+        * @param string $mime mime type
+        * @return string Comma separated list of allowed extensions (e.g. 
".ogg, .oga")
         */
        private function getExtensionList( $mime ) {
                $exts = MimeMagic::singleton()->getExtensionsForType( $mime );
@@ -291,7 +291,7 @@
        /**
         * Output a header for a new media type section
         *
-        * @param $mediaType string A media type (e.g. from the MEDIATYPE_xxx 
constants)
+        * @param string $mediaType A media type (e.g. from the MEDIATYPE_xxx 
constants)
         */
        protected function outputMediaType( $mediaType ) {
                $this->getOutput()->addHTML(
@@ -318,8 +318,8 @@
        /**
         * parse the fake title format that this special page abuses querycache 
with.
         *
-        * @param $fakeTitle String A string formatted as <media type>;<mime 
type>;<count>;<bytes>
-        * @return Array The constituant parts of $fakeTitle
+        * @param string $fakeTitle A string formatted as <media type>;<mime 
type>;<count>;<bytes>
+        * @return array The constituant parts of $fakeTitle
         */
        private function splitFakeTitle( $fakeTitle ) {
                return explode( ';', $fakeTitle, 4 );
@@ -337,8 +337,8 @@
         * This method isn't used, since we override outputResults, but
         * we need to implement since abstract in parent class.
         *
-        * @param $skin Skin
-        * @param $result stdObject Result row
+        * @param Skin $skin
+        * @param stdObject $result Result row
         * @return bool|string|void
         * @throws MWException
         */
@@ -349,8 +349,8 @@
        /**
         * Initialize total values so we can figure out percentages later.
         *
-        * @param $dbr IDatabase
-        * @param $res ResultWrapper
+        * @param IDatabase $dbr
+        * @param ResultWrapper $res
         */
        public function preprocessResults( $dbr, $res ) {
                $this->totalCount = $this->totalBytes = 0;
diff --git a/tests/phpunit/includes/MergeHistoryTest.php 
b/tests/phpunit/includes/MergeHistoryTest.php
index 5ea0cdf..22f6fa6 100644
--- a/tests/phpunit/includes/MergeHistoryTest.php
+++ b/tests/phpunit/includes/MergeHistoryTest.php
@@ -21,10 +21,10 @@
        /**
         * @dataProvider provideIsValidMerge
         * @covers MergeHistory::isValidMerge
-        * @param $source string Source page
-        * @param $dest string Destination page
-        * @param $timestamp string|bool Timestamp up to which revisions are 
merged (or false for all)
-        * @param $error string|bool Expected error for test (or true for no 
error)
+        * @param string $source Source page
+        * @param string $dest Destination page
+        * @param string|bool $timestamp Timestamp up to which revisions are 
merged (or false for all)
+        * @param string|bool $error Expected error for test (or true for no 
error)
         */
        public function testIsValidMerge( $source, $dest, $timestamp, $error ) {
                $this->setMwGlobals( 'wgContentHandlerUseDB', false );
diff --git a/tests/phpunit/includes/media/GIFTest.php 
b/tests/phpunit/includes/media/GIFTest.php
index f24b68b..aaa3ac4 100644
--- a/tests/phpunit/includes/media/GIFTest.php
+++ b/tests/phpunit/includes/media/GIFTest.php
@@ -150,8 +150,8 @@
        }
 
        /**
-        * @param $filename string
-        * @param $expectedLength float
+        * @param string $filename
+        * @param float $expectedLength
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {
diff --git a/tests/phpunit/includes/media/MediaHandlerTest.php 
b/tests/phpunit/includes/media/MediaHandlerTest.php
index 1eddaff..7a052f6 100644
--- a/tests/phpunit/includes/media/MediaHandlerTest.php
+++ b/tests/phpunit/includes/media/MediaHandlerTest.php
@@ -53,9 +53,9 @@
         * out of parameters:
         * $width, $height, { $max => $expected, $max2 => $expected2, ... }
         *
-        * @param $width int
-        * @param $height int
-        * @param $tests array associative array of $max => $expected values
+        * @param int $width
+        * @param int $height
+        * @param array $tests associative array of $max => $expected values
         * @return array
         */
        private static function generateTestFitBoxWidthData( $width, $height, 
$tests ) {
diff --git a/tests/phpunit/includes/media/PNGTest.php 
b/tests/phpunit/includes/media/PNGTest.php
index afc338e..32d54df 100644
--- a/tests/phpunit/includes/media/PNGTest.php
+++ b/tests/phpunit/includes/media/PNGTest.php
@@ -139,8 +139,8 @@
        }
 
        /**
-        * @param $filename string
-        * @param $expectedLength float
+        * @param string $filename
+        * @param float $expectedLength
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/286271
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I860d222382cb4c5699d313b0600bd22503c8c385
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to