From 21e0c1c53326fcff9e52604144cf254fadde57fa Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 13 Aug 2014 21:41:39 +0200 Subject: [PATCH] Correct variable names in @param to match method declarations Some @param have a typo in the variable name, some @param's were in wrong order. Change-Id: Ie25806831027112b398f6f4a909c59147ac3a5fa --- includes/Block.php | 2 +- includes/changes/RecentChange.php | 2 +- includes/filebackend/SwiftFileBackend.php | 2 +- includes/filerepo/file/File.php | 2 +- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/MssqlInstaller.php | 2 +- includes/media/BitmapMetadataHandler.php | 2 +- includes/media/XCF.php | 2 +- includes/objectcache/MemcachedBagOStuff.php | 2 +- includes/objectcache/WinCacheBagOStuff.php | 2 +- includes/page/WikiPage.php | 2 +- includes/poolcounter/PoolWorkArticleView.php | 2 +- includes/revisiondelete/RevisionDeleter.php | 2 +- includes/upload/UploadBase.php | 2 +- includes/utils/MWCryptHKDF.php | 2 +- includes/utils/UIDGenerator.php | 2 +- languages/Language.php | 4 ++-- maintenance/namespaceDupes.php | 4 ++-- tests/phpunit/includes/ImagePageTest.php | 2 +- .../phpunit/includes/api/query/ApiQueryContinueTestBase.php | 2 +- tests/phpunit/includes/api/query/ApiQueryTest.php | 2 +- tests/phpunit/includes/media/XCFTest.php | 2 +- tests/phpunit/maintenance/DumpTestCase.php | 6 +++--- tests/phpunit/maintenance/fetchTextTest.php | 2 +- tests/testHelpers.inc | 4 ++-- thumb.php | 2 +- 26 files changed, 31 insertions(+), 31 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index 45bae28249..5881353a0c 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1105,11 +1105,11 @@ class Block { * - If there are multiple exact or range blocks at the same level, the one chosen * is random * + * @param array $blocks Array of blocks * @param array $ipChain List of IPs (strings). This is used to determine how "close" * a block is to the server, and if a block matches exactly, or is in a range. * The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2, * local-squid, ...) - * @param array $block Array of blocks * @return Block|null The "best" block from the list */ public static function chooseBlock( array $blocks, array $ipChain ) { diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index cfebf409fe..eed52c052b 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -136,7 +136,7 @@ class RecentChange { /** * Parsing RC_* constants to human-readable test * @since 1.24 - * @param int $rc_type + * @param int $rcType * @return string $type */ public static function parseFromRCType( $rcType ) { diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index e9c8883d3d..f40ec46e2c 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -173,7 +173,7 @@ class SwiftFileBackend extends FileBackendStore { * Sanitize and filter the custom headers from a $params array. * We only allow certain Content- and X-Content- headers. * - * @param array $headers + * @param array $params * @return array Sanitized value of 'headers' field in $params */ protected function sanitizeHdrs( array $params ) { diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index a61002aeac..4e11c817ea 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1937,7 +1937,7 @@ abstract class File { * @note Use getWidth()/getHeight() instead of this method unless you have a * a good reason. This method skips all caches. * - * @param string $fileName The path to the file (e.g. From getLocalPathRef() ) + * @param string $filePath The path to the file (e.g. From getLocalPathRef() ) * @return array The width, followed by height, with optionally more things after */ function getImageSize( $filePath ) { diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index b25ea09c24..427ded4207 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -297,9 +297,9 @@ abstract class DatabaseUpdater { * @param string $tableName The table name * @param string $oldIndexName The old index name * @param string $newIndexName The new index name + * @param string $sqlPath The path to the SQL change path * @param bool $skipBothIndexExistWarning Whether to warn if both the old * and the new indexes exist. [facultative; by default, false] - * @param string $sqlPath The path to the SQL change path */ public function renameExtensionIndex( $tableName, $oldIndexName, $newIndexName, $sqlPath, $skipBothIndexExistWarning = false diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php index 83681b6b29..46bb86c010 100644 --- a/includes/installer/MssqlInstaller.php +++ b/includes/installer/MssqlInstaller.php @@ -702,7 +702,7 @@ class MssqlInstaller extends DatabaseInstaller { /** * Try to see if a given fulltext catalog exists * We assume we already have the appropriate database selected - * @param string $schemaName Catalog name to check + * @param string $catalogName Catalog name to check * @return bool */ private function catalogExists( $catalogName ) { diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php index 053c586432..dd41c388cd 100644 --- a/includes/media/BitmapMetadataHandler.php +++ b/includes/media/BitmapMetadataHandler.php @@ -97,7 +97,7 @@ class BitmapMetadataHandler { /** Add misc metadata. Warning: atm if the metadata category * doesn't have a priority, it will be silently discarded. * - * @param array $meta Array of metadata values + * @param array $metaArray Array of metadata values * @param string $type Type. defaults to other. if two things have the same type they're merged */ function addMetadata( $metaArray, $type = 'other' ) { diff --git a/includes/media/XCF.php b/includes/media/XCF.php index 04099c3def..503336efab 100644 --- a/includes/media/XCF.php +++ b/includes/media/XCF.php @@ -155,7 +155,7 @@ class XCFHandler extends BitmapHandler { * * @param File $file The image object, or false if there isn't one. * Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!) - * @param string $path The filename + * @param string $filename The filename * @return string */ public function getMetadata( $file, $filename ) { diff --git a/includes/objectcache/MemcachedBagOStuff.php b/includes/objectcache/MemcachedBagOStuff.php index 79a684137e..59191d76c1 100644 --- a/includes/objectcache/MemcachedBagOStuff.php +++ b/includes/objectcache/MemcachedBagOStuff.php @@ -78,8 +78,8 @@ class MemcachedBagOStuff extends BagOStuff { } /** - * @param string $key * @param mixed $casToken + * @param string $key * @param mixed $value * @param int $exptime * @return bool diff --git a/includes/objectcache/WinCacheBagOStuff.php b/includes/objectcache/WinCacheBagOStuff.php index 2a882ace83..78a512ceab 100644 --- a/includes/objectcache/WinCacheBagOStuff.php +++ b/includes/objectcache/WinCacheBagOStuff.php @@ -52,7 +52,7 @@ class WinCacheBagOStuff extends BagOStuff { * Store a value in the WinCache object cache * * @param string $key Cache key - * @param mixed $valueObject Value to store + * @param mixed $value Value to store * @param int $expire Expiration time * @return bool */ diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index be5ce3fc69..47f64a2930 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2314,8 +2314,8 @@ class WikiPage implements Page, IDBAccessObject { * @param Content $content Content submitted * @param User $user The relevant user * @param string $comment Comment submitted - * @param string $serialisation_format Format for storing the content in the database * @param bool $minor Whereas it's a minor modification + * @param string $serialisation_format Format for storing the content in the database */ public function doQuickEditContent( Content $content, User $user, $comment = '', $minor = false, $serialisation_format = null diff --git a/includes/poolcounter/PoolWorkArticleView.php b/includes/poolcounter/PoolWorkArticleView.php index 4cdb0fff20..5e7e39129a 100644 --- a/includes/poolcounter/PoolWorkArticleView.php +++ b/includes/poolcounter/PoolWorkArticleView.php @@ -45,9 +45,9 @@ class PoolWorkArticleView extends PoolCounterWork { /** * @param Page $page + * @param ParserOptions $parserOptions ParserOptions to use for the parse * @param int $revid ID of the revision being parsed. * @param bool $useParserCache Whether to use the parser cache. - * @param ParserOptions $parserOptions ParserOptions to use for the parse * operation. * @param Content|string $content Content to parse or null to load it; may * also be given as a wikitext string, for BC. diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index dc52969a16..d4f816780c 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -189,7 +189,7 @@ class RevisionDeleter { * Suggest a target for the revision deletion * @since 1.22 * @param string $typeName - * @param Title|null $title User-supplied target + * @param Title|null $target User-supplied target * @param array $ids * @return Title|null */ diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 4d74a2df70..58d4533493 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1498,7 +1498,7 @@ abstract class UploadBase { /** * Divide the element name passed by the xml parser to the callback into URI and prifix. - * @param string $name + * @param string $element * @return array Containing the namespace URI and prefix */ private static function splitXmlNamespace( $element ) { diff --git a/includes/utils/MWCryptHKDF.php b/includes/utils/MWCryptHKDF.php index 8610386cfc..6c532497bd 100644 --- a/includes/utils/MWCryptHKDF.php +++ b/includes/utils/MWCryptHKDF.php @@ -257,8 +257,8 @@ class MWCryptHKDF { * and the SKM (source key material) is the "data". * * @param string $hash The hashing function to use (e.g., sha256) - * @param string $ikm The input keying material * @param string $salt The salt to add to the ikm, to get the prk + * @param string $ikm The input keying material * @return string Binary string (pseudorandm key) used as input to HKDFExpand */ private static function HKDFExtract( $hash, $salt, $ikm ) { diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index 604d3810b8..dffe2423b3 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -117,7 +117,7 @@ class UIDGenerator { } /** - * @param array $time (UIDGenerator::millitime(), clock sequence) + * @param array $info (UIDGenerator::millitime(), clock sequence) * @return string 88 bits */ protected function getTimestampedID88( array $info ) { diff --git a/languages/Language.php b/languages/Language.php index 99dc184561..5b10f0f047 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -345,7 +345,7 @@ class Language { /** * Returns true if a language code is an IETF tag known to MediaWiki. * - * @param string $code + * @param string $tag * * @since 1.21 * @return bool @@ -3808,8 +3808,8 @@ class Language { * Checks that convertPlural was given an array and pads it to requested * amount of forms by copying the last one. * - * @param int $count How many forms should there be at least * @param array $forms Array of forms given to convertPlural + * @param int $count How many forms should there be at least * @return array Padded array of forms or an exception if not an array */ protected function preConvertPlural( /* Array */ $forms, $count ) { diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index ea86e880dd..cbc389be62 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -186,8 +186,8 @@ class NamespaceConflictChecker extends Maintenance { /** * @todo Do this for real - * @param int $ns - * @param string $name + * @param int $key + * @param string $prefix * @param bool $fix * @param string $suffix * @return bool diff --git a/tests/phpunit/includes/ImagePageTest.php b/tests/phpunit/includes/ImagePageTest.php index 0272c5461b..3c255b5f66 100644 --- a/tests/phpunit/includes/ImagePageTest.php +++ b/tests/phpunit/includes/ImagePageTest.php @@ -22,7 +22,7 @@ class ImagePageTest extends MediaWikiMediaTestCase { /** * @dataProvider providerGetDisplayWidthHeight - * @param array $dimensions Array [maxWidth, maxHeight, width, height] + * @param array $dim Array [maxWidth, maxHeight, width, height] * @param array $expected Array [width, height] The width and height we expect to display at */ function testGetDisplayWidthHeight( $dim, $expected ) { diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php index 6f4479b74f..d986e694e7 100644 --- a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php +++ b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php @@ -37,7 +37,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase { * @param array $params Api parameters * @param int $expectedCount Max number of iterations * @param string $id Unit test id - * @param bool $useContinue True to use smart continue + * @param bool $continue True to use smart continue * @return Merged results data array */ protected function checkC( $expected, $params, $expectedCount, $id, $continue = true ) { diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php b/tests/phpunit/includes/api/query/ApiQueryTest.php index 7b686a3154..bba22c77f7 100644 --- a/tests/phpunit/includes/api/query/ApiQueryTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryTest.php @@ -96,7 +96,7 @@ class ApiQueryTest extends ApiTestCase { * @param string $titlePart * @param int $namespace * @param string $expected - * @param string $description + * @param string $expectException * @dataProvider provideTestTitlePartToKey */ function testTitlePartToKey( $titlePart, $namespace, $expected, $expectException ) { diff --git a/tests/phpunit/includes/media/XCFTest.php b/tests/phpunit/includes/media/XCFTest.php index 9b6391c4f3..5b2de151f2 100644 --- a/tests/phpunit/includes/media/XCFTest.php +++ b/tests/phpunit/includes/media/XCFTest.php @@ -17,7 +17,7 @@ class XCFHandlerTest extends MediaWikiMediaTestCase { /** * @param string $filename * @param int $expectedWidth Width - * @param int $expectedHeigh Height + * @param int $expectedHeight Height * @dataProvider provideGetImageSize * @covers XCFHandler::getImageSize */ diff --git a/tests/phpunit/maintenance/DumpTestCase.php b/tests/phpunit/maintenance/DumpTestCase.php index dad30b7988..45d5ea8c3e 100644 --- a/tests/phpunit/maintenance/DumpTestCase.php +++ b/tests/phpunit/maintenance/DumpTestCase.php @@ -30,7 +30,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase { * * @param Page $page Page to add the revision to * @param string $text Revisions text - * @param string $text Revisions summare + * @param string $summary Revisions summare * * @throws MWException */ @@ -181,7 +181,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase { * Asserts that the xml reader is at the final closing tag of an xml file and * closes the reader. * - * @param string $tag (optional) the name of the final tag + * @param string $name (optional) the name of the final tag * (e.g.: "mediawiki" for ) */ protected function assertDumpEnd( $name = "mediawiki" ) { @@ -304,9 +304,9 @@ abstract class DumpTestCase extends MediaWikiLangTestCase { * @param string $text_sha1 The base36 SHA-1 of the revision's text * @param string|bool $text (optional) The revision's string, or false to check for a * revision stub + * @param int|bool $parentid (optional) id of the parent revision * @param string $model The expected content model id (default: CONTENT_MODEL_WIKITEXT) * @param string $format The expected format model id (default: CONTENT_FORMAT_WIKITEXT) - * @param int|bool $parentid (optional) id of the parent revision */ protected function assertRevision( $id, $summary, $text_id, $text_bytes, $text_sha1, $text = false, $parentid = false, diff --git a/tests/phpunit/maintenance/fetchTextTest.php b/tests/phpunit/maintenance/fetchTextTest.php index 1ad4656f3c..b2141d34d2 100644 --- a/tests/phpunit/maintenance/fetchTextTest.php +++ b/tests/phpunit/maintenance/fetchTextTest.php @@ -100,7 +100,7 @@ class FetchTextTest extends MediaWikiTestCase { * * @param WikiPage $page The page to add the revision to * @param string $text The revisions text - * @param string $text The revisions summare + * @param string $summary The revisions summare * * @throws MWException */ diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index 717c5f34d7..d6609f422a 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -570,7 +570,7 @@ class TestFileIterator implements Iterator { * Throw an exception if it is not set, referencing current section * and adding the current file name and line number * - * @param string|array $token Expected token(s) that should have been + * @param string|array $tokens Expected token(s) that should have been * mentioned before closing this section * @param bool $fatal True iff an exception should be thrown if * the section is not found. @@ -702,7 +702,7 @@ class DelayedParserTest { /** * Similar to ParserTest object but does not run anything * Use unleash() to really execute the hook function - * @param string $fnHook + * @param string $hook */ public function requireTransparentHook( $hook ) { $this->transparentHooks[] = $hook; diff --git a/thumb.php b/thumb.php index efaa65bc62..d8ed246f96 100644 --- a/thumb.php +++ b/thumb.php @@ -553,7 +553,7 @@ function wfExtractThumbRequestInfo( $thumbRel ) { * file handler. * * @param File $file File object for file in question - * @param array $param Array of parameters so far + * @param array $params Array of parameters so far * @return array Parameters array with more parameters */ function wfExtractThumbParams( $file, $params ) { -- 2.20.1