Fix and standardize Doxygen tags
authorRicordisamoa <ricordisamoa@openmailbox.org>
Sat, 30 Apr 2016 10:10:17 +0000 (12:10 +0200)
committerRicordisamoa <ricordisamoa@openmailbox.org>
Sat, 30 Apr 2016 10:10:17 +0000 (12:10 +0200)
* Use "@param datatype $paramname description" format

* String → string, Integer → int etc.

* @return $string → @return string

Change-Id: I860d222382cb4c5699d313b0600bd22503c8c385

16 files changed:
includes/EditPage.php
includes/api/ApiQueryImageInfo.php
includes/compat/normal/UtfNormalUtil.php
includes/libs/CSSMin.php
includes/media/GIF.php
includes/media/PNG.php
includes/media/TransformationalImageHandler.php
includes/password/PasswordPolicyChecks.php
includes/resourceloader/ResourceLoaderSkinModule.php
includes/search/SearchEngine.php
includes/specialpage/QueryPage.php
includes/specials/SpecialMediaStatistics.php
tests/phpunit/includes/MergeHistoryTest.php
tests/phpunit/includes/media/GIFTest.php
tests/phpunit/includes/media/MediaHandlerTest.php
tests/phpunit/includes/media/PNGTest.php

index 3522531..8f6b202 100644 (file)
@@ -3777,7 +3777,7 @@ HTML
         * Shows a bulletin board style toolbar for common editing functions.
         * It can be disabled in the user preferences.
         *
         * 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 ) {
         * @return string
         */
        static function getEditToolbar( $title = null ) {
index 13e6340..d1fcfa3 100644 (file)
@@ -325,8 +325,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
         * allows us to catch certain error conditions early (such as missing
         * required parameter).
         *
         * 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();
         */
        protected function checkParameterNormalise( $image, $finalParams ) {
                $h = $image->getHandler();
index 0bc8d0f..8791e4c 100644 (file)
@@ -30,8 +30,8 @@ use UtfNormal\Utils;
 /**
  * Return UTF-8 sequence for a given Unicode code point.
  *
 /**
  * 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
  * @throws InvalidArgumentException if fed out of range data.
  * @public
  * @deprecated since 1.25, use UtfNormal\Utils directly
@@ -45,8 +45,8 @@ function codepointToUtf8( $codepoint ) {
  * Unicode code points and return a UTF-8 string composed of those
  * characters. Used by UTF-8 data generation and testing routines.
  *
  * 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
  * @throws InvalidArgumentException if fed out of range data.
  * @private
  * @deprecated since 1.25, use UtfNormal\Utils directly
@@ -77,8 +77,8 @@ function utf8ToHexSequence( $str ) {
  * Determine the Unicode codepoint of a single-character UTF-8 sequence.
  * Does not check for invalid input data.
  *
  * 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
  */
  * @public
  * @deprecated since 1.25, use UtfNormal\Utils directly
  */
index 2f2faed..6e40f4c 100644 (file)
@@ -172,7 +172,7 @@ class CSSMin {
        }
 
        /**
        }
 
        /**
-        * @param $file string
+        * @param string $file
         * @return bool|string
         */
        public static function getMimeType( $file ) {
         * @return bool|string
         */
        public static function getMimeType( $file ) {
index 8ec7298..5f23855 100644 (file)
@@ -193,7 +193,7 @@ class GIFHandler extends BitmapHandler {
         *
         * Shown in the &query=imageinfo&iiprop=size api query.
         *
         *
         * 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 ) {
         * @return float The duration of the file.
         */
        public function getLength( $file ) {
index f9af101..8a3e001 100644 (file)
@@ -180,7 +180,7 @@ class PNGHandler extends BitmapHandler {
         *
         * Shown in the &query=imageinfo&iiprop=size api query.
         *
         *
         * 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 ) {
         * @return float The duration of the file.
         */
        public function getLength( $file ) {
index f1f2161..3287fac 100644 (file)
@@ -288,9 +288,9 @@ abstract class TransformationalImageHandler extends ImageHandler {
        /**
         * Get the source file for the transform
         *
        /**
         * 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 );
         */
        protected function getThumbnailSource( $file, $params ) {
                return $file->getThumbnailSource( $params );
index 7ea87c3..d7aee5b 100644 (file)
@@ -117,11 +117,11 @@ class PasswordPolicyChecks {
        /**
         * Ensure that password isn't in top X most popular passwords
         *
        /**
         * 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.
         *   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
         */
         * @since 1.27
         * @return Status
         */
index 490a4ab..91e63e7 100644 (file)
@@ -26,7 +26,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
        /* Methods */
 
        /**
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
@@ -68,7 +68,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
        }
 
        /**
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
         * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
@@ -78,7 +78,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
        }
 
        /**
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string: Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
         * @return string: Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
index be5ab92..27b6dd4 100644 (file)
@@ -380,7 +380,7 @@ abstract class SearchEngine {
         * Makes search simple string if it was namespaced.
         * Sets namespaces of the search to namespaces extracted from string.
         * @param string $search
         * 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
         */
        protected function normalizeNamespaces( $search ) {
                // Find a Title which is not an interwiki and is in NS_MAIN
index 2523810..1beac43 100644 (file)
@@ -513,8 +513,8 @@ abstract class QueryPage extends SpecialPage {
         * What is limit to fetch from DB
         *
         * Used to make it appear the DB stores less results then it actually does
         * 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 ) {
         * @return int Limit to use for DB (not including extra row to see if at end)
         */
        protected function getDBLimit( $uiLimit, $uiOffset ) {
index 8ba90a6..e51e8b5 100644 (file)
@@ -109,12 +109,12 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Output the results of the query.
         *
        /**
         * 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;
         */
        protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
                $prevMediaType = null;
@@ -168,9 +168,9 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Output a row of the stats table
         *
        /**
         * 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 );
         */
        protected function outputTableRow( $mime, $count, $bytes ) {
                $mimeSearch = SpecialPage::getTitleFor( 'MIMEsearch', $mime );
@@ -230,8 +230,8 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Given a mime type, return a comma separated list of allowed extensions.
         *
        /**
         * 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 );
         */
        private function getExtensionList( $mime ) {
                $exts = MimeMagic::singleton()->getExtensionsForType( $mime );
@@ -291,7 +291,7 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Output a header for a new media type section
         *
        /**
         * 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(
         */
        protected function outputMediaType( $mediaType ) {
                $this->getOutput()->addHTML(
@@ -318,8 +318,8 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * parse the fake title format that this special page abuses querycache with.
         *
        /**
         * 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 );
         */
        private function splitFakeTitle( $fakeTitle ) {
                return explode( ';', $fakeTitle, 4 );
@@ -337,8 +337,8 @@ class MediaStatisticsPage extends QueryPage {
         * This method isn't used, since we override outputResults, but
         * we need to implement since abstract in parent class.
         *
         * 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
         */
         * @return bool|string|void
         * @throws MWException
         */
@@ -349,8 +349,8 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Initialize total values so we can figure out percentages later.
         *
        /**
         * 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;
         */
        public function preprocessResults( $dbr, $res ) {
                $this->totalCount = $this->totalBytes = 0;
index 5ea0cdf..22f6fa6 100644 (file)
@@ -21,10 +21,10 @@ class MergeHistoryTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideIsValidMerge
         * @covers MergeHistory::isValidMerge
        /**
         * @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 );
         */
        public function testIsValidMerge( $source, $dest, $timestamp, $error ) {
                $this->setMwGlobals( 'wgContentHandlerUseDB', false );
index f24b68b..aaa3ac4 100644 (file)
@@ -150,8 +150,8 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
        }
 
        /**
        }
 
        /**
-        * @param $filename string
-        * @param $expectedLength float
+        * @param string $filename
+        * @param float $expectedLength
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {
index 1eddaff..7a052f6 100644 (file)
@@ -53,9 +53,9 @@ class MediaHandlerTest extends MediaWikiTestCase {
         * out of parameters:
         * $width, $height, { $max => $expected, $max2 => $expected2, ... }
         *
         * 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 ) {
         * @return array
         */
        private static function generateTestFitBoxWidthData( $width, $height, $tests ) {
index afc338e..32d54df 100644 (file)
@@ -139,8 +139,8 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
        }
 
        /**
        }
 
        /**
-        * @param $filename string
-        * @param $expectedLength float
+        * @param string $filename
+        * @param float $expectedLength
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {
         * @dataProvider provideGetLength
         */
        public function testGetLength( $filename, $expectedLength ) {