From 4dcc7961dfe37cd3fe4671a21fed30990cc6f959 Mon Sep 17 00:00:00 2001 From: Tyler Anthony Romeo Date: Mon, 11 Mar 2013 13:15:01 -0400 Subject: [PATCH] Fixed @param tags to conform with Doxygen format. Doxygen expects parameter types to come before the parameter name in @param tags. Used a quick regex to switch everything around where possible. This only fixes cases where a primitve variable (or a primitive followed by other types) is the variable type. Other cases will need to be fixed manually. Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13 --- includes/Action.php | 6 +- includes/Article.php | 20 +- includes/AuthPlugin.php | 16 +- includes/AutoLoader.php | 2 +- includes/Autopromote.php | 4 +- includes/Block.php | 28 +- includes/Category.php | 2 +- includes/CategoryPage.php | 2 +- includes/CategoryViewer.php | 20 +- includes/Categoryfinder.php | 8 +- includes/ChangeTags.php | 20 +- includes/ChangesFeed.php | 20 +- includes/ChangesList.php | 28 +- includes/Collation.php | 8 +- includes/ConfEditor.php | 4 +- includes/Cookie.php | 14 +- includes/CryptRand.php | 10 +- includes/DataUpdate.php | 2 +- includes/DeferredUpdates.php | 2 +- includes/EditPage.php | 34 +-- includes/Exception.php | 24 +- includes/Export.php | 14 +- includes/ExternalEdit.php | 2 +- includes/ExternalUser.php | 2 +- includes/Fallback.php | 8 +- includes/Feed.php | 14 +- includes/FeedUtils.php | 12 +- includes/FileDeleteForm.php | 6 +- includes/FormOptions.php | 18 +- includes/GitInfo.php | 4 +- includes/GlobalFunctions.php | 138 +++++----- includes/HTMLForm.php | 94 +++---- includes/HistoryBlob.php | 2 +- includes/Hooks.php | 14 +- includes/Html.php | 36 +-- includes/HttpFunctions.php | 16 +- includes/IP.php | 30 +-- includes/ImageGallery.php | 6 +- includes/ImagePage.php | 8 +- includes/Import.php | 4 +- includes/Init.php | 2 +- includes/Licenses.php | 2 +- includes/LinkFilter.php | 8 +- includes/Linker.php | 140 +++++----- includes/LinksUpdate.php | 12 +- includes/Message.php | 18 +- includes/MessageBlobStore.php | 30 +-- includes/MimeMagic.php | 20 +- includes/Namespace.php | 38 +-- includes/OutputPage.php | 140 +++++----- includes/PHPVersionError.php | 2 +- includes/Pager.php | 22 +- includes/PathRouter.php | 8 +- includes/Preferences.php | 4 +- includes/PrefixSearch.php | 8 +- includes/ProtectionForm.php | 8 +- includes/RecentChange.php | 14 +- includes/Revision.php | 8 +- includes/Sanitizer.php | 18 +- includes/SiteConfiguration.php | 70 ++--- includes/SiteStats.php | 8 +- includes/Skin.php | 30 +-- includes/SkinTemplate.php | 12 +- includes/SpecialPage.php | 40 +-- includes/SpecialPageFactory.php | 4 +- includes/Status.php | 14 +- includes/StreamFile.php | 18 +- includes/StringUtils.php | 16 +- includes/StubObject.php | 16 +- includes/Timestamp.php | 6 +- includes/Title.php | 228 ++++++++-------- includes/UIDGenerator.php | 10 +- includes/User.php | 234 ++++++++--------- includes/UserMailer.php | 26 +- includes/UserRightsProxy.php | 14 +- includes/WebRequest.php | 50 ++-- includes/WebResponse.php | 24 +- includes/WikiError.php | 2 +- includes/WikiMap.php | 26 +- includes/WikiPage.php | 80 +++--- includes/Xml.php | 138 +++++----- includes/XmlTypeCheck.php | 2 +- includes/ZhClient.php | 8 +- includes/ZipDirectoryReader.php | 18 +- includes/actions/CreditsAction.php | 8 +- includes/actions/HistoryAction.php | 6 +- includes/actions/InfoAction.php | 10 +- includes/api/ApiBase.php | 80 +++--- includes/api/ApiDelete.php | 4 +- includes/api/ApiFormatBase.php | 8 +- includes/api/ApiImageRotate.php | 8 +- includes/api/ApiMain.php | 24 +- includes/api/ApiModuleManager.php | 12 +- includes/api/ApiPageSet.php | 26 +- includes/api/ApiPurge.php | 8 +- includes/api/ApiQuery.php | 14 +- includes/api/ApiQueryAllUsers.php | 2 +- includes/api/ApiQueryBase.php | 68 ++--- includes/api/ApiQueryImageInfo.php | 12 +- includes/api/ApiQueryInfo.php | 2 +- includes/api/ApiQueryRecentChanges.php | 2 +- includes/api/ApiResult.php | 18 +- includes/api/ApiUpload.php | 14 +- includes/cache/BacklinkCache.php | 2 +- includes/cache/CacheDependency.php | 8 +- includes/cache/FileCacheBase.php | 2 +- includes/cache/GenderCache.php | 8 +- includes/cache/LinkBatch.php | 2 +- includes/cache/LinkCache.php | 4 +- includes/cache/LocalisationCache.php | 4 +- includes/cache/MessageCache.php | 18 +- includes/cache/SquidUpdate.php | 4 +- includes/cache/UserCache.php | 12 +- includes/clientpool/RedisConnectionPool.php | 2 +- includes/content/AbstractContent.php | 4 +- includes/content/Content.php | 14 +- includes/content/ContentHandler.php | 32 +-- includes/content/TextContent.php | 10 +- includes/content/WikitextContent.php | 6 +- includes/dao/DBAccessBase.php | 2 +- includes/db/CloneDatabase.php | 10 +- includes/db/Database.php | 248 +++++++++--------- includes/db/DatabaseError.php | 2 +- includes/db/DatabaseMssql.php | 18 +- includes/db/DatabaseMysql.php | 8 +- includes/db/DatabaseOracle.php | 2 +- includes/db/DatabasePostgres.php | 10 +- includes/db/DatabaseSqlite.php | 14 +- includes/db/DatabaseUtility.php | 2 +- includes/db/IORMTable.php | 2 +- includes/db/LBFactory.php | 12 +- includes/db/LBFactory_Multi.php | 2 +- includes/db/LBFactory_Single.php | 2 +- includes/db/LoadBalancer.php | 10 +- includes/db/LoadMonitor.php | 2 +- includes/db/ORMRow.php | 2 +- includes/db/ORMTable.php | 2 +- includes/debug/Debug.php | 12 +- includes/diff/DifferenceEngine.php | 14 +- includes/externalstore/ExternalStore.php | 14 +- includes/externalstore/ExternalStoreDB.php | 6 +- .../externalstore/ExternalStoreMedium.php | 8 +- includes/filebackend/FSFile.php | 4 +- includes/filebackend/FSFileBackend.php | 12 +- includes/filebackend/FileBackend.php | 72 ++--- .../filebackend/FileBackendMultiWrite.php | 18 +- includes/filebackend/FileBackendStore.php | 60 ++--- includes/filebackend/FileOp.php | 12 +- includes/filebackend/FileOpBatch.php | 4 +- includes/filebackend/SwiftFileBackend.php | 42 +-- .../filebackend/filejournal/FileJournal.php | 10 +- .../filebackend/lockmanager/DBLockManager.php | 2 +- .../filebackend/lockmanager/LSLockManager.php | 2 +- .../filebackend/lockmanager/LockManager.php | 8 +- .../lockmanager/LockManagerGroup.php | 4 +- .../lockmanager/MemcLockManager.php | 8 +- .../lockmanager/QuorumLockManager.php | 4 +- .../filebackend/lockmanager/ScopedLock.php | 4 +- includes/filerepo/FileRepo.php | 84 +++--- includes/filerepo/ForeignAPIRepo.php | 6 +- includes/filerepo/LocalRepo.php | 12 +- includes/filerepo/RepoGroup.php | 16 +- includes/filerepo/file/File.php | 76 +++--- includes/filerepo/file/ForeignAPIFile.php | 2 +- includes/filerepo/file/LocalFile.php | 34 +-- includes/filerepo/file/OldLocalFile.php | 16 +- .../filerepo/file/UnregisteredLocalFile.php | 2 +- includes/installer/CliInstaller.php | 2 +- includes/installer/DatabaseInstaller.php | 2 +- includes/installer/DatabaseUpdater.php | 94 +++---- includes/installer/Installer.php | 14 +- includes/installer/LocalSettingsGenerator.php | 6 +- includes/installer/MysqlInstaller.php | 8 +- includes/installer/MysqlUpdater.php | 12 +- includes/installer/PostgresInstaller.php | 16 +- includes/installer/WebInstaller.php | 18 +- includes/installer/WebInstallerOutput.php | 2 +- includes/installer/WebInstallerPage.php | 4 +- includes/job/Job.php | 12 +- includes/job/JobQueue.php | 2 +- includes/job/JobQueueDB.php | 6 +- includes/job/JobQueueGroup.php | 4 +- includes/job/JobQueueRedis.php | 2 +- includes/job/jobs/DoubleRedirectJob.php | 4 +- includes/job/jobs/DuplicateJob.php | 2 +- includes/job/jobs/HTMLCacheUpdateJob.php | 2 +- includes/job/jobs/NullJob.php | 2 +- includes/job/jobs/UploadFromUrlJob.php | 4 +- includes/json/FormatJson.php | 2 +- includes/json/Services_JSON.php | 10 +- includes/libs/CSSJanus.php | 10 +- includes/libs/CSSMin.php | 14 +- includes/libs/IEContentAnalyzer.php | 12 +- includes/libs/IEUrlExtension.php | 10 +- includes/libs/JavaScriptMinifier.php | 6 +- includes/logging/LogEntry.php | 6 +- includes/logging/LogEventsList.php | 12 +- includes/logging/LogFormatter.php | 6 +- includes/logging/LogPage.php | 26 +- includes/logging/LogPager.php | 18 +- includes/media/Bitmap.php | 26 +- includes/media/BitmapMetadataHandler.php | 12 +- includes/media/Exif.php | 16 +- includes/media/FormatMetadata.php | 26 +- includes/media/IPTC.php | 14 +- includes/media/Jpeg.php | 2 +- includes/media/JpegMetadataExtractor.php | 4 +- includes/media/MediaHandler.php | 34 +-- includes/media/MediaTransformOutput.php | 12 +- includes/media/SVGMetadataExtractor.php | 12 +- includes/media/XCF.php | 2 +- includes/media/XMP.php | 64 ++--- includes/media/XMPValidate.php | 18 +- includes/normal/UtfNormal.php | 24 +- includes/normal/UtfNormalUtil.php | 4 +- includes/objectcache/APCBagOStuff.php | 4 +- includes/objectcache/BagOStuff.php | 24 +- includes/objectcache/EmptyBagOStuff.php | 4 +- includes/objectcache/MemcachedBagOStuff.php | 2 +- includes/objectcache/MemcachedClient.php | 46 ++-- .../objectcache/MemcachedPeclBagOStuff.php | 2 +- includes/objectcache/MultiWriteBagOStuff.php | 4 +- .../objectcache/ObjectCacheSessionHandler.php | 8 +- includes/objectcache/WinCacheBagOStuff.php | 18 +- includes/objectcache/XCacheBagOStuff.php | 14 +- includes/parser/CacheTime.php | 2 +- includes/parser/CoreParserFunctions.php | 16 +- includes/parser/DateFormatter.php | 10 +- includes/parser/LinkHolderArray.php | 8 +- includes/parser/Parser.php | 90 +++---- includes/parser/ParserOutput.php | 12 +- includes/parser/Preprocessor_DOM.php | 2 +- includes/parser/Preprocessor_Hash.php | 2 +- includes/parser/Tidy.php | 6 +- includes/profiler/Profiler.php | 12 +- includes/resourceloader/ResourceLoader.php | 78 +++--- .../resourceloader/ResourceLoaderContext.php | 2 +- .../ResourceLoaderFileModule.php | 22 +- .../resourceloader/ResourceLoaderModule.php | 16 +- .../RevisionDeleteAbstracts.php | 6 +- includes/revisiondelete/RevisionDeleter.php | 4 +- includes/search/SearchEngine.php | 24 +- includes/search/SearchMssql.php | 4 +- includes/search/SearchMySQL.php | 4 +- includes/search/SearchOracle.php | 4 +- includes/search/SearchPostgres.php | 2 +- includes/search/SearchSqlite.php | 4 +- includes/site/MediaWikiSite.php | 2 +- includes/specials/SpecialActiveusers.php | 2 +- includes/specials/SpecialAllpages.php | 30 +-- includes/specials/SpecialBlock.php | 10 +- includes/specials/SpecialBlockList.php | 2 +- includes/specials/SpecialBooksources.php | 10 +- includes/specials/SpecialConfirmemail.php | 4 +- includes/specials/SpecialContributions.php | 2 +- .../specials/SpecialDeletedContributions.php | 4 +- includes/specials/SpecialEditWatchlist.php | 12 +- includes/specials/SpecialEmailuser.php | 6 +- includes/specials/SpecialExport.php | 2 +- .../specials/SpecialFileDuplicateSearch.php | 2 +- includes/specials/SpecialJavaScriptTest.php | 4 +- includes/specials/SpecialListgrouprights.php | 12 +- includes/specials/SpecialListusers.php | 8 +- includes/specials/SpecialMostlinked.php | 2 +- includes/specials/SpecialMovepage.php | 2 +- includes/specials/SpecialPrefixindex.php | 10 +- includes/specials/SpecialProtectedpages.php | 6 +- includes/specials/SpecialRecentchanges.php | 8 +- includes/specials/SpecialRevisiondelete.php | 4 +- includes/specials/SpecialSearch.php | 20 +- includes/specials/SpecialUndelete.php | 12 +- includes/specials/SpecialUpload.php | 14 +- includes/specials/SpecialUploadStash.php | 16 +- includes/specials/SpecialUserlogin.php | 14 +- includes/specials/SpecialUserrights.php | 18 +- includes/specials/SpecialVersion.php | 6 +- includes/specials/SpecialWhatlinkshere.php | 4 +- includes/upload/UploadBase.php | 26 +- includes/upload/UploadFromChunks.php | 6 +- includes/upload/UploadStash.php | 24 +- 280 files changed, 2527 insertions(+), 2527 deletions(-) diff --git a/includes/Action.php b/includes/Action.php index cace4b4c2f..7c3a3ba2c7 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -147,7 +147,7 @@ abstract class Action { /** * Check if a given action is recognised, even if it's disabled * - * @param $name String: name of an action + * @param string $name name of an action * @return Bool */ final public static function exists( $name ) { @@ -545,8 +545,8 @@ abstract class FormlessAction extends Action { /** * Execute the action silently, not giving any output. Since these actions don't have * forms, they probably won't have any data, but some (eg rollback) may do - * @param $data Array values that would normally be in the GET request - * @param $captureErrors Bool whether to catch exceptions and just return false + * @param array $data values that would normally be in the GET request + * @param bool $captureErrors whether to catch exceptions and just return false * @throws ErrorPageError|Exception * @return Bool whether execution was successful */ diff --git a/includes/Article.php b/includes/Article.php index d0a972562f..e5919cfe79 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -134,7 +134,7 @@ class Article implements Page { /** * Constructor from a page id - * @param $id Int article ID to load + * @param int $id article ID to load * @return Article|null */ public static function newFromID( $id ) { @@ -853,7 +853,7 @@ class Article implements Page { /** * Get the robot policy to be used for the current view - * @param $action String the action= GET parameter + * @param string $action the action= GET parameter * @param $pOutput ParserOutput * @return Array the policy that should be set * TODO: actions other than 'view' @@ -1211,7 +1211,7 @@ class Article implements Page { * Revision as of \; view current revision * \<- Previous version | Next Version -\> * - * @param $oldid int: revision ID of this article revision + * @param int $oldid revision ID of this article revision */ public function setOldSubtitle( $oldid = 0 ) { if ( !wfRunHooks( 'DisplayOldSubtitle', array( &$this, &$oldid ) ) ) { @@ -1519,7 +1519,7 @@ class Article implements Page { /** * Output deletion confirmation dialog * @todo FIXME: Move to another file? - * @param $reason String: prefilled reason + * @param string $reason prefilled reason */ public function confirmDelete( $reason ) { wfDebug( "Article::confirmDelete\n" ); @@ -1887,8 +1887,8 @@ class Article implements Page { * * @deprecated in 1.18; call OutputPage::redirect() directly * @param $noRedir Boolean: add redirect=no - * @param $sectionAnchor String: section to redirect to, including "#" - * @param $extraQuery String: extra query params + * @param string $sectionAnchor section to redirect to, including "#" + * @param string $extraQuery extra query params */ public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) { wfDeprecated( __METHOD__, '1.18' ); @@ -1908,7 +1908,7 @@ class Article implements Page { * Use PHP's magic __get handler to handle accessing of * raw WikiPage fields for backwards compatibility. * - * @param $fname String Field name + * @param string $fname Field name */ public function __get( $fname ) { if ( property_exists( $this->mPage, $fname ) ) { @@ -1922,7 +1922,7 @@ class Article implements Page { * Use PHP's magic __set handler to handle setting of * raw WikiPage fields for backwards compatibility. * - * @param $fname String Field name + * @param string $fname Field name * @param $fvalue mixed New value */ public function __set( $fname, $fvalue ) { @@ -1941,8 +1941,8 @@ class Article implements Page { * Use PHP's magic __call handler to transform instance calls to * WikiPage functions for backwards compatibility. * - * @param $fname String Name of called method - * @param $args Array Arguments to the method + * @param string $fname Name of called method + * @param array $args Arguments to the method * @return mixed */ public function __call( $fname, $args ) { diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 2e42439c9f..a46581764a 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -46,7 +46,7 @@ class AuthPlugin { * you might need to munge it (for instance, for lowercase initial * letters). * - * @param $username String: username. + * @param string $username username. * @return bool */ public function userExists( $username ) { @@ -60,8 +60,8 @@ class AuthPlugin { * you might need to munge it (for instance, for lowercase initial * letters). * - * @param $username String: username. - * @param $password String: user password. + * @param string $username username. + * @param string $password user password. * @return bool */ public function authenticate( $username, $password ) { @@ -73,7 +73,7 @@ class AuthPlugin { * Modify options in the login template. * * @param $template UserLoginTemplate object. - * @param $type String 'signup' or 'login'. Added in 1.16. + * @param string $type 'signup' or 'login'. Added in 1.16. */ public function modifyUITemplate( &$template, &$type ) { # Override this! @@ -83,7 +83,7 @@ class AuthPlugin { /** * Set the domain this plugin is supposed to use when authenticating. * - * @param $domain String: authentication domain. + * @param string $domain authentication domain. */ public function setDomain( $domain ) { $this->domain = $domain; @@ -105,7 +105,7 @@ class AuthPlugin { /** * Check to see if the specific domain is a valid domain. * - * @param $domain String: authentication domain. + * @param string $domain authentication domain. * @return bool */ public function validDomain( $domain ) { @@ -194,7 +194,7 @@ class AuthPlugin { * Return true if successful. * * @param $user User object. - * @param $password String: password. + * @param string $password password. * @return bool */ public function setPassword( $user, $password ) { @@ -251,7 +251,7 @@ class AuthPlugin { * Check if a user should authenticate locally if the global authentication fails. * If either this or strict() returns true, local authentication is not used. * - * @param $username String: username. + * @param string $username username. * @return Boolean */ public function strictUserAuth( $username ) { diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 3b5fbac7a3..713623223c 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -1109,7 +1109,7 @@ class AutoLoader { /** * autoload - take a class name and attempt to load it * - * @param $className String: name of class we're looking for. + * @param string $className name of class we're looking for. * @return bool Returning false is important on failure as * it allows Zend to try and look in other registered autoloaders * as well. diff --git a/includes/Autopromote.php b/includes/Autopromote.php index d7ed2f904b..781f4fccad 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -54,7 +54,7 @@ class Autopromote { * Does not return groups the user already belongs to or has once belonged. * * @param $user User The user to get the groups for - * @param $event String key in $wgAutopromoteOnce (each one has groups/criteria) + * @param string $event key in $wgAutopromoteOnce (each one has groups/criteria) * * @return array Groups the user should be promoted to. * @@ -155,7 +155,7 @@ class Autopromote { * APCOND_AGE. Other types will throw an exception if no extension evalu- * ates them. * - * @param $cond Array: A condition, which must not contain other conditions + * @param array $cond A condition, which must not contain other conditions * @param $user User The user to check the condition against * @throws MWException * @return bool Whether the condition is true for the user diff --git a/includes/Block.php b/includes/Block.php index e20b5fdb41..3843631ad2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -106,7 +106,7 @@ class Block { * user ID. Tries the user ID first, and if that doesn't work, tries * the address. * - * @param $address String: IP address of user/anon + * @param string $address IP address of user/anon * @param $user Integer: user id of user * @return Block Object * @deprecated since 1.18 @@ -199,8 +199,8 @@ class Block { /** * Get a block from the DB, with either the given address or the given username * - * @param $address string The IP address of the user, or blank to skip IP blocks - * @param $user int The user ID, or zero for anonymous users + * @param string $address The IP address of the user, or blank to skip IP blocks + * @param int $user The user ID, or zero for anonymous users * @return Boolean: the user is blocked from editing * @deprecated since 1.18 */ @@ -331,8 +331,8 @@ class Block { /** * Get a set of SQL conditions which will select rangeblocks encompasing a given range - * @param $start String Hexadecimal IP representation - * @param $end String Hexadecimal IP represenation, or null to use $start = $end + * @param string $start Hexadecimal IP representation + * @param string $end Hexadecimal IP represenation, or null to use $start = $end * @return String */ public static function getRangeCond( $start, $end = null ) { @@ -572,7 +572,7 @@ class Block { * blocked by this Block. This will use the recentchanges table. * * @param Block $block - * @param Array &$blockIds + * @param array &$blockIds * @return Array: block IDs of retroactive autoblocks made */ protected static function defaultRetroactiveAutoblock( Block $block, array &$blockIds ) { @@ -611,7 +611,7 @@ class Block { * Checks whether a given IP is on the autoblock whitelist. * TODO: this probably belongs somewhere else, but not sure where... * - * @param $ip String: The IP to check + * @param string $ip The IP to check * @return Boolean */ public static function isWhitelistedFromAutoblocks( $ip ) { @@ -654,7 +654,7 @@ class Block { /** * Autoblocks the given IP, referring to this Block. * - * @param $autoblockIP String: the IP to autoblock. + * @param string $autoblockIP the IP to autoblock. * @return mixed: block ID if an autoblock was inserted, false if not. */ public function doAutoblock( $autoblockIP ) { @@ -945,7 +945,7 @@ class Block { /** * Encode expiry for DB * - * @param $expiry String: timestamp for expiry, or + * @param string $expiry timestamp for expiry, or * @param $db DatabaseBase object * @return String * @deprecated since 1.18; use $dbw->encodeExpiry() instead @@ -958,8 +958,8 @@ class Block { /** * Decode expiry which has come from the DB * - * @param $expiry String: Database expiry format - * @param $timestampType Int Requested timestamp format + * @param string $expiry Database expiry format + * @param int $timestampType Requested timestamp format * @return String * @deprecated since 1.18; use $wgLang->formatExpiry() instead */ @@ -984,7 +984,7 @@ class Block { /** * Gets rid of uneeded numbers in quad-dotted/octet IP strings * For example, 127.111.113.151/24 -> 127.111.113.0/24 - * @param $range String: IP address to normalize + * @param string $range IP address to normalize * @return string * @deprecated since 1.18, call IP::sanitizeRange() directly */ @@ -1018,7 +1018,7 @@ class Block { /** * Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute * ("24 May 2034"), into an absolute timestamp we can put into the database. - * @param $expiry String: whatever was typed into the form + * @param string $expiry whatever was typed into the form * @return String: timestamp or "infinity" string for th DB implementation * @deprecated since 1.18 moved to SpecialBlock::parseExpiryInput() */ @@ -1042,7 +1042,7 @@ class Block { * @param $vagueTarget String|User|Int as above, but we will search for *any* block which * affects that target (so for an IP address, get ranges containing that IP; and also * get any relevant autoblocks). Leave empty or blank to skip IP-based lookups. - * @param $fromMaster Bool whether to use the DB_MASTER database + * @param bool $fromMaster whether to use the DB_MASTER database * @return Block|null (null if no relevant block could be found). The target and type * of the returned Block will refer to the actual block which was found, which might * not be the same as the target you gave if you used $vagueTarget! diff --git a/includes/Category.php b/includes/Category.php index 53e44d710c..c8397f74d4 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -106,7 +106,7 @@ class Category { /** * Factory function. * - * @param $name Array: A category name (no "Category:" prefix). It need + * @param array $name A category name (no "Category:" prefix). It need * not be normalized, with spaces replaced by underscores. * @return mixed Category, or false on a totally invalid name */ diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 3e69dd4f84..43ab4dbd69 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -40,7 +40,7 @@ class CategoryPage extends Article { /** * Constructor from a page id - * @param $id Int article ID to load + * @param int $id article ID to load * @return CategoryPage|null */ public static function newFromID( $id ) { diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 878c37184a..f9020b751c 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -71,9 +71,9 @@ class CategoryViewer extends ContextSource { * @since 1.19 $context is a second, required parameter * @param $title Title * @param $context IContextSource - * @param $from Array An array with keys page, subcat, + * @param array $from An array with keys page, subcat, * and file for offset of results of each section (since 1.17) - * @param $until Array An array with 3 keys for until of each section (since 1.17) + * @param array $until An array with 3 keys for until of each section (since 1.17) * @param $query Array */ function __construct( $title, IContextSource $context, $from = array(), $until = array(), $query = array() ) { @@ -441,7 +441,7 @@ class CategoryViewer extends ContextSource { * Get the paging links for a section (subcats/pages/files), to go at the top and bottom * of the output. * - * @param $type String: 'page', 'subcat', or 'file' + * @param string $type 'page', 'subcat', or 'file' * @return String: HTML output, possibly empty if there are no other pages */ private function getSectionPagingLinks( $type ) { @@ -573,9 +573,9 @@ class CategoryViewer extends ContextSource { /** * Create paging links, as a helper method to getSectionPagingLinks(). * - * @param $first String The 'until' parameter for the generated URL - * @param $last String The 'from' parameter for the genererated URL - * @param $type String A prefix for parameters, 'page' or 'subcat' or + * @param string $first The 'until' parameter for the generated URL + * @param string $last The 'from' parameter for the genererated URL + * @param string $type A prefix for parameters, 'page' or 'subcat' or * 'file' * @return String HTML */ @@ -616,7 +616,7 @@ class CategoryViewer extends ContextSource { * corresponds to the correct segment of the category. * * @param Title $title: The title (usually $this->title) - * @param String $section: Which section + * @param string $section: Which section * @throws MWException * @return Title */ @@ -650,9 +650,9 @@ class CategoryViewer extends ContextSource { * category-subcat-count-limited, category-file-count, * category-file-count-limited. * - * @param $rescnt Int: The number of items returned by our database query. - * @param $dbcnt Int: The number of items according to the category table. - * @param $type String: 'subcat', 'article', or 'file' + * @param int $rescnt The number of items returned by our database query. + * @param int $dbcnt The number of items according to the category table. + * @param string $type 'subcat', 'article', or 'file' * @return String: A message giving the number of items, to output to HTML. */ private function getCountMessage( $rescnt, $dbcnt, $type ) { diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index cb67aa82b7..59e6593108 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -66,7 +66,7 @@ class Categoryfinder { * Initializes the instance. Do this prior to calling run(). * @param $article_ids Array of article IDs * @param $categories FIXME - * @param $mode String: FIXME, default 'AND'. + * @param string $mode FIXME, default 'AND'. * @todo FIXME: $categories/$mode */ function seed( $article_ids, $categories, $mode = 'AND' ) { @@ -111,9 +111,9 @@ class Categoryfinder { /** * This functions recurses through the parent representation, trying to match the conditions - * @param $id int The article/category to check - * @param $conds array The array of categories to match - * @param $path array used to check for recursion loops + * @param int $id The article/category to check + * @param array $conds The array of categories to match + * @param array $path used to check for recursion loops * @return bool Does this match the conditions? */ function check( $id, &$conds, $path = array() ) { diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 1dd9b595bb..88f7d44060 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -25,8 +25,8 @@ class ChangeTags { /** * Creates HTML for the given tags * - * @param $tags String: Comma-separated list of tags - * @param $page String: A label for the type of action which is being displayed, + * @param string $tags Comma-separated list of tags + * @param string $page A label for the type of action which is being displayed, * for example: 'history', 'contributions' or 'newpages' * * @return Array with two items: (html, classes) @@ -62,7 +62,7 @@ class ChangeTags { /** * Get a short description for a tag * - * @param $tag String: tag + * @param string $tag tag * * @return String: Short description of the tag from "mediawiki:tag-$tag" if this message exists, * html-escaped version of $tag otherwise @@ -75,11 +75,11 @@ class ChangeTags { /** * Add tags to a change given its rc_id, rev_id and/or log_id * - * @param $tags String|Array: Tags to add to the change + * @param string|array $tags Tags to add to the change * @param $rc_id int: rc_id of the change to add the tags to * @param $rev_id int: rev_id of the change to add the tags to * @param $log_id int: log_id of the change to add the tags to - * @param $params String: params to put in the ct_params field of tabel 'change_tag' + * @param string $params params to put in the ct_params field of tabel 'change_tag' * * @throws MWException * @return bool: false if no changes are made, otherwise true @@ -160,11 +160,11 @@ class ChangeTags { * Handles selecting tags, and filtering. * Needs $tables to be set up properly, so we can figure out which join conditions to use. * - * @param $tables String|Array: Tabel names, see DatabaseBase::select - * @param $fields String|Array: Fields used in query, see DatabaseBase::select - * @param $conds String|Array: conditions used in query, see DatabaseBase::select + * @param string|array $tables Tabel names, see DatabaseBase::select + * @param string|array $fields Fields used in query, see DatabaseBase::select + * @param string|array $conds conditions used in query, see DatabaseBase::select * @param $join_conds Array: join conditions, see DatabaseBase::select - * @param $options Array: options, see Database::select + * @param array $options options, see Database::select * @param bool|string $filter_tag Tag to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging @@ -211,7 +211,7 @@ class ChangeTags { /** * Build a text box to select a change tag * - * @param $selected String: tag to select by default + * @param string $selected tag to select by default * @param $fullForm Boolean: * - if false, then it returns an array of (label, form). * - if true, it returns an entire form around the selector. diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index ae30272110..476de5bd9d 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -31,8 +31,8 @@ class ChangesFeed { /** * Constructor * - * @param $format String: feed's format (either 'rss' or 'atom') - * @param $type String: type of feed (for cache keys) + * @param string $format feed's format (either 'rss' or 'atom') + * @param string $type type of feed (for cache keys) */ public function __construct( $format, $type ) { $this->format = $format; @@ -42,9 +42,9 @@ class ChangesFeed { /** * Get a ChannelFeed subclass object to use * - * @param $title String: feed's title - * @param $description String: feed's description - * @param $url String: url of origin page + * @param string $title feed's title + * @param string $description feed's description + * @param string $url url of origin page * @return ChannelFeed subclass or false on failure */ public function getFeedObject( $title, $description, $url ) { @@ -110,9 +110,9 @@ class ChangesFeed { /** * Save to feed result to $messageMemc * - * @param $feed String: feed's content - * @param $timekey String: memcached key of the last modification - * @param $key String: memcached key of the content + * @param string $feed feed's content + * @param string $timekey memcached key of the last modification + * @param string $key memcached key of the content */ public function saveToCache( $feed, $timekey, $key ) { global $messageMemc; @@ -125,8 +125,8 @@ class ChangesFeed { * Try to load the feed result from $messageMemc * * @param $lastmod Integer: timestamp of the last item in the recentchanges table - * @param $timekey String: memcached key of the last modification - * @param $key String: memcached key of the content + * @param string $timekey memcached key of the last modification + * @param string $key memcached key of the content * @return string|bool feed's content on cache hit or false on cache miss */ public function loadFromCache( $lastmod, $timekey, $key ) { diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 2f715bfdbf..451f2da594 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -80,7 +80,7 @@ class ChangesList extends ContextSource { * This first argument used to be an User object. * * @deprecated in 1.18; use newFromContext() instead - * @param $unused string|User Unused + * @param string|User $unused Unused * @return ChangesList|EnhancedChangesList|OldChangesList derivative */ public static function newFromUser( $unused ) { @@ -130,8 +130,8 @@ class ChangesList extends ContextSource { /** * Returns the appropriate flags for new page, minor change and patrolling - * @param $flags Array Associative array of 'flag' => Bool - * @param $nothing String to use for empty space + * @param array $flags Associative array of 'flag' => Bool + * @param string $nothing to use for empty space * @return String */ protected function recentChangesFlags( $flags, $nothing = ' ' ) { @@ -150,7 +150,7 @@ class ChangesList extends ContextSource { * unpatrolled edit. By default in English it will contain "N", "m", "b", * "!" respectively, plus it will have an appropriate title and class. * - * @param $flag String: 'newpage', 'unpatrolled', 'minor', or 'bot' + * @param string $flag 'newpage', 'unpatrolled', 'minor', or 'bot' * @return String: Raw HTML */ public static function flag( $flag ) { @@ -287,7 +287,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc_timestamp mixed */ public function insertDateHeader( &$s, $rc_timestamp ) { @@ -304,7 +304,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $title Title * @param $logtype string */ @@ -315,7 +315,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange * @param $unpatrolled */ @@ -358,7 +358,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange * @param $unpatrolled * @param $watched @@ -407,7 +407,7 @@ class ChangesList extends ContextSource { /** * Insert time timestamp string from $rc into $s * - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange */ public function insertTimestamp( &$s, $rc ) { @@ -587,8 +587,8 @@ class OldChangesList extends ChangesList { * Format a line using the old system (aka without any javascript). * * @param $rc RecentChange, passed by reference - * @param $watched Bool (default false) - * @param $linenumber Int (default null) + * @param bool $watched (default false) + * @param int $linenumber (default null) * * @return string|bool */ @@ -1137,9 +1137,9 @@ class EnhancedChangesList extends ChangesList { /** * Generate HTML for an arrow or placeholder graphic - * @param $dir String: one of '', 'd', 'l', 'r' - * @param $alt String: text - * @param $title String: text + * @param string $dir one of '', 'd', 'l', 'r' + * @param string $alt text + * @param string $title text * @return String: HTML "" tag */ protected function arrow( $dir, $alt = '', $title = '' ) { diff --git a/includes/Collation.php b/includes/Collation.php index c356947e24..8a78084ab0 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -422,13 +422,13 @@ class IcuCollation extends Collation { * Do a binary search, and return the index of the largest item that sorts * less than or equal to the target value. * - * @param $valueCallback array A function to call to get the value with + * @param array $valueCallback A function to call to get the value with * a given array index. - * @param $valueCount int The number of items accessible via $valueCallback, + * @param int $valueCount The number of items accessible via $valueCallback, * indexed from 0 to $valueCount - 1 - * @param $comparisonCallback array A callback to compare two values, returning + * @param array $comparisonCallback A callback to compare two values, returning * -1, 0 or 1 in the style of strcmp(). - * @param $target string The target value to find. + * @param string $target The target value to find. * * @return int|bool The item index of the lower bound, or false if the target value * sorts before all items. diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index e5c2e5c810..1d9ca92120 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -127,7 +127,7 @@ class ConfEditor { /** * Edit the text. Returns the edited text. - * @param $ops Array of operations. + * @param array $ops of operations. * * Operations are given as an associative array, with members: * type: One of delete, set, append or insert (required) @@ -306,7 +306,7 @@ class ConfEditor { * setVar( $arr, 'foo/bar', 'baz', 3 ); will set * $arr['foo']['bar']['baz'] = 3; * @param $array array - * @param $path string slash-delimited path + * @param string $path slash-delimited path * @param $key mixed Key * @param $value mixed Value */ diff --git a/includes/Cookie.php b/includes/Cookie.php index a6eb79a5a5..27a8507258 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -43,8 +43,8 @@ class Cookie { * cookies. Used internally after a request to parse the * Set-Cookie headers. * - * @param $value String: the value of the cookie - * @param $attr Array: possible key/values: + * @param string $value the value of the cookie + * @param array $attr possible key/values: * expires A date string * path The path this cookie is used on * domain Domain this cookie is used on @@ -84,8 +84,8 @@ class Cookie { * @todo fixme fails to detect 3-letter top-level domains * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases) * - * @param $domain String: the domain to validate - * @param $originDomain String: (optional) the domain the cookie originates from + * @param string $domain the domain to validate + * @param string $originDomain (optional) the domain the cookie originates from * @return Boolean */ public static function validateCookieDomain( $domain, $originDomain = null ) { @@ -142,8 +142,8 @@ class Cookie { /** * Serialize the cookie jar into a format useful for HTTP Request headers. * - * @param $path String: the path that will be used. Required. - * @param $domain String: the domain that will be used. Required. + * @param string $path the path that will be used. Required. + * @param string $domain the domain that will be used. Required. * @return String */ public function serializeToHttpRequest( $path, $domain ) { @@ -232,7 +232,7 @@ class CookieJar { * Parse the content of an Set-Cookie HTTP Response header. * * @param $cookie String - * @param $domain String: cookie's domain + * @param string $domain cookie's domain * @return null */ public function parseCookieResponseHeader ( $cookie, $domain ) { diff --git a/includes/CryptRand.php b/includes/CryptRand.php index 4255d56f33..01bbc44b3d 100644 --- a/includes/CryptRand.php +++ b/includes/CryptRand.php @@ -148,7 +148,7 @@ class MWCryptRand { /** * Randomly hash data while mixing in clock drift data for randomness * - * @param $data string The data to randomly hash. + * @param string $data The data to randomly hash. * @return String The hashed bytes * @author Tim Starling */ @@ -468,8 +468,8 @@ class MWCryptRand { * You can use MWCryptRand::wasStrong() if you wish to know if the source used * was cryptographically strong. * - * @param $bytes int the number of bytes of random data to generate - * @param $forceStrong bool Pass true if you want generate to prefer cryptographically + * @param int $bytes the number of bytes of random data to generate + * @param bool $forceStrong Pass true if you want generate to prefer cryptographically * strong sources of entropy even if reading from them may steal * more entropy from the system than optimal. * @return String Raw binary random data @@ -484,8 +484,8 @@ class MWCryptRand { * You can use MWCryptRand::wasStrong() if you wish to know if the source used * was cryptographically strong. * - * @param $chars int the number of hex chars of random data to generate - * @param $forceStrong bool Pass true if you want generate to prefer cryptographically + * @param int $chars the number of hex chars of random data to generate + * @param bool $forceStrong Pass true if you want generate to prefer cryptographically * strong sources of entropy even if reading from them may steal * more entropy from the system than optimal. * @return String Hexadecimal random data diff --git a/includes/DataUpdate.php b/includes/DataUpdate.php index 04029db3da..419d7e5f02 100644 --- a/includes/DataUpdate.php +++ b/includes/DataUpdate.php @@ -74,7 +74,7 @@ abstract class DataUpdate implements DeferrableUpdate { * This allows for limited transactional logic across multiple backends for storing * secondary data. * - * @param $updates array a list of DataUpdate instances + * @param array $updates a list of DataUpdate instances * @throws Exception|null */ public static function runUpdates( $updates ) { diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 716e65c8c3..2ca646b254 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -66,7 +66,7 @@ class DeferredUpdates { /** * Do any deferred updates and clear the list * - * @param $commit String: set to 'commit' to commit after every update to + * @param string $commit set to 'commit' to commit after every update to * prevent lock contention */ public static function doUpdates( $commit = '' ) { diff --git a/includes/EditPage.php b/includes/EditPage.php index 1bb165f1db..a0b6c93cf9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -476,7 +476,7 @@ class EditPage { * "View source for ..." page displaying the source code after the error message. * * @since 1.19 - * @param $permErrors Array of permissions errors, as returned by + * @param array $permErrors of permissions errors, as returned by * Title::getUserPermissionsErrors(). * @throws PermissionsError */ @@ -1049,7 +1049,7 @@ class EditPage { * Get the contents to be preloaded into the box, either set by * an earlier setPreloadText() or by loading the given page. * - * @param $preload String: representing the title to preload from. + * @param string $preload representing the title to preload from. * * @return String * @@ -1068,7 +1068,7 @@ class EditPage { * Get the contents to be preloaded into the box, either set by * an earlier setPreloadText() or by loading the given page. * - * @param $preload String: representing the title to preload from. + * @param string $preload representing the title to preload from. * * @return Content * @@ -2055,7 +2055,7 @@ class EditPage { * an exception will be raised. Set $this->allowNonTextContent to true to allow editing of non-textual * content. * - * @param String|null|bool $text Text to unserialize + * @param string|null|bool $text Text to unserialize * @return Content The content object created from $text. If $text was false or null, false resp. null will be * returned instead. * @@ -2433,10 +2433,10 @@ class EditPage { * inferred by the id given to the input. You can remove them both by * passing array( 'id' => false ) to $userInputAttrs. * - * @param $summary string The value of the summary input - * @param $labelText string The html to place inside the label - * @param $inputAttrs array of attrs to use on the input - * @param $spanLabelAttrs array of attrs to use on the span inside the label + * @param string $summary The value of the summary input + * @param string $labelText The html to place inside the label + * @param array $inputAttrs of attrs to use on the input + * @param array $spanLabelAttrs of attrs to use on the span inside the label * * @return array An array in the format array( $label, $input ) */ @@ -2470,7 +2470,7 @@ class EditPage { * @param $isSubjectPreview Boolean: true if this is the section subject/title * up top, or false if this is the comment summary * down below the textarea - * @param $summary String: The text of the summary to display + * @param string $summary The text of the summary to display * @return String */ protected function showSummaryInput( $isSubjectPreview, $summary = "" ) { @@ -2496,7 +2496,7 @@ class EditPage { * @param $isSubjectPreview Boolean: true if this is the section subject/title * up top, or false if this is the comment summary * down below the textarea - * @param $summary String: the text of the summary to display + * @param string $summary the text of the summary to display * @return String */ protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) { @@ -2569,8 +2569,8 @@ HTML * The $textoverride method can be used by subclasses overriding showContentForm * to pass back to this method. * - * @param $customAttribs array of html attributes to use in the textarea - * @param $textoverride String: optional text to override $this->textarea1 with + * @param array $customAttribs of html attributes to use in the textarea + * @param string $textoverride optional text to override $this->textarea1 with */ protected function showTextbox1( $customAttribs = null, $textoverride = null ) { if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) { @@ -2674,7 +2674,7 @@ HTML * Append preview output to $wgOut. * Includes category rendering if this is a category page. * - * @param $text String: the HTML to be output for the preview. + * @param string $text the HTML to be output for the preview. */ protected function showPreview( $text ) { global $wgOut; @@ -3297,8 +3297,8 @@ HTML * Returns an array of html code of the following checkboxes: * minor and watch * - * @param $tabindex int Current tabindex - * @param $checked Array of checkbox => bool, where bool indicates the checked + * @param int $tabindex Current tabindex + * @param array $checked of checkbox => bool, where bool indicates the checked * status of the checkbox * * @return array @@ -3348,7 +3348,7 @@ HTML * Returns an array of html code of the following buttons: * save, diff, preview and live * - * @param $tabindex int Current tabindex + * @param int $tabindex Current tabindex * * @return array */ @@ -3477,7 +3477,7 @@ HTML /** * Produce the stock "your edit contains spam" page * - * @param $match string|bool Text which triggered one or more filters + * @param string|bool $match Text which triggered one or more filters * @deprecated since 1.17 Use method spamPageWithContent() instead */ static function spamPage( $match = false ) { diff --git a/includes/Exception.php b/includes/Exception.php index 2764ea9da7..530afd0480 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -64,8 +64,8 @@ class MWException extends Exception { /** * Run hook to allow extensions to modify the text of the exception * - * @param $name string: class name of the exception - * @param $args array: arguments to pass to the callback functions + * @param string $name class name of the exception + * @param array $args arguments to pass to the callback functions * @return string|null string to output or null if any hook has been called */ function runHooks( $name, $args = array() ) { @@ -99,8 +99,8 @@ class MWException extends Exception { /** * Get a message from i18n * - * @param $key string: message name - * @param $fallback string: default message if the message cache can't be + * @param string $key message name + * @param string $fallback default message if the message cache can't be * called by the exception * The function also has other parameters that are arguments for the message * @return string message with arguments replaced @@ -320,9 +320,9 @@ class ErrorPageError extends MWException { /** * Note: these arguments are keys into wfMessage(), not text! * - * @param $title string|Message Message key (string) for page title, or a Message object - * @param $msg string|Message Message key (string) for error text, or a Message object - * @param $params array with parameters to wfMessage() + * @param string|Message $title Message key (string) for page title, or a Message object + * @param string|Message $msg Message key (string) for error text, or a Message object + * @param array $params with parameters to wfMessage() */ function __construct( $title, $msg, $params = null ) { $this->title = $title; @@ -354,8 +354,8 @@ class ErrorPageError extends MWException { */ class BadTitleError extends ErrorPageError { /** - * @param $msg string|Message A message key (default: 'badtitletext') - * @param $params Array parameter to wfMessage() + * @param string|Message $msg A message key (default: 'badtitletext') + * @param array $params parameter to wfMessage() */ function __construct( $msg = 'badtitletext', $params = null ) { parent::__construct( 'badtitle', $msg, $params ); @@ -557,8 +557,8 @@ class HttpError extends MWException { * Constructor * * @param $httpCode Integer: HTTP status code to send to the client - * @param $content String|Message: content of the message - * @param $header String|Message: content of the header (\ and \) + * @param string|Message $content content of the message + * @param string|Message $header content of the header (\ and \) */ public function __construct( $httpCode, $content, $header = null ) { parent::__construct( $content ); @@ -684,7 +684,7 @@ class MWExceptionHandler { * Print a message, if possible to STDERR. * Use this in command line mode only (see isCommandLine) * - * @param $message string Failure text + * @param string $message Failure text */ public static function printError( $message ) { # NOTE: STDERR may not be available, especially if php-cgi is used from the command line (bug #15602). diff --git a/includes/Export.php b/includes/Export.php index 85f2368247..bfd561e7c8 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -80,8 +80,8 @@ class WikiExporter { * offset: non-inclusive offset at which to start the query * limit: maximum number of rows to return * dir: "asc" or "desc" timestamp order - * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM - * @param $text Int: one of WikiExporter::TEXT or WikiExporter::STUB + * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM + * @param int $text one of WikiExporter::TEXT or WikiExporter::STUB */ function __construct( $db, $history = WikiExporter::CURRENT, $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) { @@ -126,7 +126,7 @@ class WikiExporter { /** * Dumps a series of page and revision records for those pages * in the database falling within the page_id range given. - * @param $start Int: inclusive lower limit (this id is included) + * @param int $start inclusive lower limit (this id is included) * @param $end Int: Exclusive upper limit (this id is not included) * If 0, no upper limit. */ @@ -141,7 +141,7 @@ class WikiExporter { /** * Dumps a series of page and revision records for those pages * in the database with revisions falling within the rev_id range given. - * @param $start Int: inclusive lower limit (this id is included) + * @param int $start inclusive lower limit (this id is included) * @param $end Int: Exclusive upper limit (this id is not included) * If 0, no upper limit. */ @@ -758,7 +758,7 @@ class XmlDumpWriter { /** * @param $timestamp string - * @param $indent string Default to six spaces + * @param string $indent Default to six spaces * @return string */ function writeTimestamp( $timestamp, $indent = " " ) { @@ -769,7 +769,7 @@ class XmlDumpWriter { /** * @param $id * @param $text string - * @param $indent string Default to six spaces + * @param string $indent Default to six spaces * @return string */ function writeContributor( $id, $text, $indent = " " ) { @@ -946,7 +946,7 @@ class DumpOutput { * Use this for the last piece of a file written out * at specified checkpoints (e.g. every n hours). * @param $newname mixed File name. May be a string or an array with one element - * @param $open bool If true, a new file with the old filename will be opened again for writing (default: false) + * @param bool $open If true, a new file with the old filename will be opened again for writing (default: false) */ function closeAndRename( $newname, $open = false ) { } diff --git a/includes/ExternalEdit.php b/includes/ExternalEdit.php index 3f73376479..11e942308c 100644 --- a/includes/ExternalEdit.php +++ b/includes/ExternalEdit.php @@ -40,7 +40,7 @@ class ExternalEdit extends ContextSource { * Check whether external edit or diff should be used. * * @param $context IContextSource context to use - * @param $type String can be either 'edit' or 'diff' + * @param string $type can be either 'edit' or 'diff' * @return Bool */ public static function useExternalEngine( IContextSource $context, $type ) { diff --git a/includes/ExternalUser.php b/includes/ExternalUser.php index 8cf9c84fa3..580b98966a 100644 --- a/includes/ExternalUser.php +++ b/includes/ExternalUser.php @@ -278,7 +278,7 @@ abstract class ExternalUser { * This is part of the core code and is not overridable by specific * plugins. It's in this class only for convenience. * - * @param $id int user_id + * @param int $id user_id */ final public function linkToLocal( $id ) { $dbw = wfGetDB( DB_MASTER ); diff --git a/includes/Fallback.php b/includes/Fallback.php index a26410a510..2e19a095d4 100644 --- a/includes/Fallback.php +++ b/includes/Fallback.php @@ -153,8 +153,8 @@ class Fallback { * Fallback implementation of mb_strpos, hardcoded to UTF-8. * @param $haystack String * @param $needle String - * @param $offset String: optional start position - * @param $encoding String: optional encoding; ignored + * @param string $offset optional start position + * @param string $encoding optional encoding; ignored * @return int */ public static function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { @@ -174,8 +174,8 @@ class Fallback { * Fallback implementation of mb_strrpos, hardcoded to UTF-8. * @param $haystack String * @param $needle String - * @param $offset String: optional start position - * @param $encoding String: optional encoding; ignored + * @param string $offset optional start position + * @param string $encoding optional encoding; ignored * @return int */ public static function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) { diff --git a/includes/Feed.php b/includes/Feed.php index 8e000ae61e..a30ba5cecb 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -52,11 +52,11 @@ class FeedItem { /** * Constructor * - * @param $title String|Title Item's title + * @param string|Title $title Item's title * @param $description String - * @param $url String: URL uniquely designating the item. - * @param $date String: Item's date - * @param $author String: Author's user name + * @param string $url URL uniquely designating the item. + * @param string $date Item's date + * @param string $author Author's user name * @param $comments String */ function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) { @@ -72,7 +72,7 @@ class FeedItem { /** * Encode $string so that it can be safely embedded in a XML document * - * @param $string String: string to encode + * @param string $string string to encode * @return String */ public function xmlEncode( $string ) { @@ -95,7 +95,7 @@ class FeedItem { /** * set the unique id of an item * - * @param $uniqueId String: unique id for the item + * @param string $uniqueId unique id for the item * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only) */ public function setUniqueId( $uniqueId, $rssIsPermalink = false ) { @@ -170,7 +170,7 @@ class FeedItem { /** * Quickie hack... strip out wikilinks to more legible form from the comment. * - * @param $text String: wikitext + * @param string $text wikitext * @return String */ public static function stripComment( $text ) { diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 8cbc66374d..5e4b24e36e 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -33,8 +33,8 @@ class FeedUtils { * If the feed should be purged; $timekey and $key will be removed from * $messageMemc * - * @param $timekey String: cache key of the timestamp of the last item - * @param $key String: cache key of feed's content + * @param string $timekey cache key of the timestamp of the last item + * @param string $key cache key of feed's content */ public static function checkPurge( $timekey, $key ) { global $wgRequest, $wgUser, $messageMemc; @@ -48,7 +48,7 @@ class FeedUtils { /** * Check whether feeds can be used and that $type is a valid feed type * - * @param $type String: feed type, as requested by the user + * @param string $type feed type, as requested by the user * @return Boolean */ public static function checkFeedOutput( $type ) { @@ -98,8 +98,8 @@ class FeedUtils { * @param $oldid Integer: old revision's id * @param $newid Integer: new revision's id * @param $timestamp Integer: new revision's timestamp - * @param $comment String: new revision's comment - * @param $actiontext String: text of the action; in case of log event + * @param string $comment new revision's comment + * @param string $actiontext text of the action; in case of log event * @return String */ public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext = '' ) { @@ -236,7 +236,7 @@ class FeedUtils { * Might be 'cleaner' to use DOM or XSLT or something, * but *gack* it's a pain in the ass. * - * @param $text String: diff's HTML output + * @param string $text diff's HTML output * @return String: modified HTML */ public static function applyDiffStyle( $text ) { diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 48073f72c8..28403ccacc 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -140,8 +140,8 @@ class FileDeleteForm { * * @param $title Title object * @param File $file: file object - * @param $oldimage String: archive name - * @param $reason String: reason of the deletion + * @param string $oldimage archive name + * @param string $reason reason of the deletion * @param $suppress Boolean: whether to mark all deleted versions as restricted * @param $user User object performing the request * @throws MWException @@ -309,7 +309,7 @@ class FileDeleteForm { * showing an appropriate message depending upon whether * it's a current file or an old version * - * @param $message String: message base + * @param string $message message base * @return String */ private function prepareMessage( $message ) { diff --git a/includes/FormOptions.php b/includes/FormOptions.php index 598be0552f..8477ed9830 100644 --- a/includes/FormOptions.php +++ b/includes/FormOptions.php @@ -104,7 +104,7 @@ class FormOptions implements ArrayAccess { /** * Verify the given option name exist. * - * @param $name String: option name + * @param string $name option name * @param $strict Boolean: throw an exception when the option does not exist (default false) * @throws MWException * @return Boolean: true if option exist, false otherwise @@ -123,7 +123,7 @@ class FormOptions implements ArrayAccess { /** * Use to set the value of an option. * - * @param $name String: option name + * @param string $name option name * @param $value Mixed: value for the option * @param $force Boolean: whether to set the value when it is equivalent to the default value for this option (default false). * @return null @@ -143,7 +143,7 @@ class FormOptions implements ArrayAccess { * Get the value for the given option name. * Internally use getValueReal() * - * @param $name String: option name + * @param string $name option name * @return Mixed */ public function getValue( $name ) { @@ -154,7 +154,7 @@ class FormOptions implements ArrayAccess { /** * @todo Document - * @param $option Array: array structure describing the option + * @param array $option array structure describing the option * @return Mixed. Value or the default value if it is null */ protected function getValueReal( $option ) { @@ -168,7 +168,7 @@ class FormOptions implements ArrayAccess { /** * Delete the option value. * This will make future calls to getValue() return the default value. - * @param $name String: option name + * @param string $name option name * @return null */ public function reset( $name ) { @@ -191,7 +191,7 @@ class FormOptions implements ArrayAccess { /** * @todo Document - * @param $names Array: array of option names + * @param array $names array of option names * @return null */ public function consumeValues( /*Array*/ $names ) { @@ -210,9 +210,9 @@ class FormOptions implements ArrayAccess { * Validate and set an option integer value * The value will be altered to fit in the range. * - * @param $name String: option name - * @param $min Int: minimum value - * @param $max Int: maximum value + * @param string $name option name + * @param int $min minimum value + * @param int $max maximum value * @throws MWException * @exception MWException Option is not of type int * @return null diff --git a/includes/GitInfo.php b/includes/GitInfo.php index 0867cd92bc..6f7f80200b 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -41,7 +41,7 @@ class GitInfo { private static $viewers = false; /** - * @param $dir string The root directory of the repo where the .git dir can be found + * @param string $dir The root directory of the repo where the .git dir can be found */ public function __construct( $dir ) { $this->basedir = "{$dir}/.git"; @@ -70,7 +70,7 @@ class GitInfo { /** * Check if a string looks like a hex encoded SHA1 hash * - * @param $str string The string to check + * @param string $str The string to check * @return bool Whether or not the string looks like a SHA1 */ public static function isSHA1( $str ) { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 99f5eb5a8f..54e546e74c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -167,7 +167,7 @@ function wfArrayLookup( $a, $b ) { * @param $key String|Int * @param $value Mixed * @param $default Mixed - * @param $changed Array to alter + * @param array $changed to alter * @throws MWException */ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) { @@ -232,8 +232,8 @@ function wfMergeErrorArrays( /*...*/ ) { /** * Insert array into another array after the specified *KEY* * - * @param $array Array: The array. - * @param $insert Array: The array to insert. + * @param array $array The array. + * @param array $insert The array to insert. * @param $after Mixed: The key to insert after * @return Array */ @@ -316,7 +316,7 @@ function wfRandom() { * @note This is not secure, if you are trying to generate some sort * of token please use MWCryptRand instead. * - * @param $length int The length of the string to generate + * @param int $length The length of the string to generate * @return String * @since 1.20 */ @@ -379,8 +379,8 @@ function wfUrlencode( $s ) { * "days=7&limit=100". Options in the first array override options in the second. * Options set to null or false will not be output. * - * @param $array1 Array ( String|Array ) - * @param $array2 Array ( String|Array ) + * @param array $array1 ( String|Array ) + * @param array $array2 ( String|Array ) * @param $prefix String * @return String */ @@ -426,7 +426,7 @@ function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) { * tibility with legacy functions that accept raw query strings instead of nice * arrays. Of course, keys and values are urldecode()d. * - * @param $query String: query string + * @param string $query query string * @return array Array version of input */ function wfCgiToArray( $query ) { @@ -506,7 +506,7 @@ function wfAppendQuery( $url, $query ) { * @todo this won't work with current-path-relative URLs * like "subdir/foo.html", etc. * - * @param $url String: either fully-qualified or a local path + query + * @param string $url either fully-qualified or a local path + query * @param $defaultProto Mixed: one of the PROTO_* constants. Determines the * protocol to use if $url or $wgServer is * protocol-relative @@ -576,7 +576,7 @@ function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) { * @todo Need to integrate this into wfExpandUrl (bug 32168) * * @since 1.19 - * @param $urlParts Array URL parts, as output from wfParseUrl + * @param array $urlParts URL parts, as output from wfParseUrl * @return string URL assembled from its component parts */ function wfAssembleUrl( $urlParts ) { @@ -628,7 +628,7 @@ function wfAssembleUrl( $urlParts ) { * * @todo Need to integrate this into wfExpandUrl (bug 32168) * - * @param $urlPath String URL path, potentially containing dot-segments + * @param string $urlPath URL path, potentially containing dot-segments * @return string URL path with all dot-segments removed */ function wfRemoveDotSegments( $urlPath ) { @@ -705,7 +705,7 @@ function wfRemoveDotSegments( $urlPath ) { /** * Returns a regular expression of url protocols * - * @param $includeProtocolRelative bool If false, remove '//' from the returned protocol list. + * @param bool $includeProtocolRelative If false, remove '//' from the returned protocol list. * DO NOT USE this directly, use wfUrlProtocolsWithoutProtRel() instead * @return String */ @@ -765,7 +765,7 @@ function wfUrlProtocolsWithoutProtRel() { * 2) Handles protocols that don't use :// (e.g., mailto: and news: , as well as protocol-relative URLs) correctly * 3) Adds a "delimiter" element to the array, either '://', ':' or '//' (see (2)) * - * @param $url String: a URL to parse + * @param string $url a URL to parse * @return Array: bits of the URL in an associative array, per PHP docs */ function wfParseUrl( $url ) { @@ -906,8 +906,8 @@ function wfMakeUrlIndexes( $url ) { /** * Check whether a given URL has a domain that occurs in a given set of domains - * @param $url string URL - * @param $domains array Array of domains (strings) + * @param string $url URL + * @param array $domains Array of domains (strings) * @return bool True if the host part of $url ends in one of the strings in $domains */ function wfMatchesDomainList( $url, $domains ) { @@ -935,7 +935,7 @@ function wfMatchesDomainList( $url, $domains ) { * $wgDebugComments - if on, some debug items may appear in comments in the HTML output. * * @param $text String - * @param $logonly Bool: set true to avoid appearing in HTML when $wgDebugComments is set + * @param bool $logonly set true to avoid appearing in HTML when $wgDebugComments is set */ function wfDebug( $text, $logonly = false ) { global $wgDebugLogFile, $wgProfileOnly, $wgDebugRawPage, $wgDebugLogPrefix; @@ -1007,7 +1007,7 @@ function wfDebugTimer() { /** * Send a line giving PHP memory usage. * - * @param $exact Bool: print exact values instead of kilobytes (default: false) + * @param bool $exact print exact values instead of kilobytes (default: false) */ function wfDebugMem( $exact = false ) { $mem = memory_get_usage(); @@ -1025,7 +1025,7 @@ function wfDebugMem( $exact = false ) { * * @param $logGroup String * @param $text String - * @param $public Bool: whether to log the event in the public log if no private + * @param bool $public whether to log the event in the public log if no private * log file is specified, (default true) */ function wfDebugLog( $logGroup, $text, $public = true ) { @@ -1046,7 +1046,7 @@ function wfDebugLog( $logGroup, $text, $public = true ) { /** * Log for database errors * - * @param $text String: database error message. + * @param string $text database error message. */ function wfLogDBError( $text ) { global $wgDBerrorLog, $wgDBerrorLogTZ; @@ -1079,8 +1079,8 @@ function wfLogDBError( $text ) { * Throws a warning that $function is deprecated * * @param $function String - * @param $version String|bool: Version of MediaWiki that the function was deprecated in (Added in 1.19). - * @param $component String|bool: Added in 1.19. + * @param string|bool $version Version of MediaWiki that the function was deprecated in (Added in 1.19). + * @param string|bool $component Added in 1.19. * @param $callerOffset integer: How far up the callstack is the original * caller. 2 = function that called the function that called * wfDeprecated (Added in 1.20) @@ -1095,7 +1095,7 @@ function wfDeprecated( $function, $version = false, $component = false, $callerO * Send a warning either to the debug log or in a PHP error depending on * $wgDevelopmentWarnings * - * @param $msg String: message to send + * @param string $msg message to send * @param $callerOffset Integer: number of items to go back in the backtrace to * find the correct caller (1 = function calling wfWarn, ...) * @param $level Integer: PHP error level; only used when $wgDevelopmentWarnings @@ -1112,7 +1112,7 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) { * send lines to the specified port, prefixed by the specified prefix and a space. * * @param $text String - * @param $file String filename + * @param string $file filename * @throws MWException */ function wfErrorLog( $text, $file ) { @@ -1425,7 +1425,7 @@ function wfMessageFallback( /*...*/ ) { * * @deprecated since 1.18 * - * @param $key String: lookup key for the message, usually + * @param string $key lookup key for the message, usually * defined in languages/Language.php * * Parameters to the message, which can be used to insert variable text into @@ -1481,7 +1481,7 @@ function wfMsgNoTrans( $key ) { * * @deprecated since 1.18 * - * @param $key String: lookup key for the message, usually + * @param string $key lookup key for the message, usually * defined in languages/Language.php * @return String */ @@ -1528,7 +1528,7 @@ function wfMsgForContentNoTrans( $key ) { * * @deprecated since 1.18 * - * @param $key String: key to get. + * @param string $key key to get. * @param $args * @param $useDB Boolean * @param $forContent Mixed: Language code, or false for user lang, true for content lang. @@ -1552,7 +1552,7 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform * * @param $key String * @param $useDB Bool - * @param $langCode String: Code of the language to get the message for, or + * @param string $langCode Code of the language to get the message for, or * behaves as a content language switch if it is a boolean. * @param $transform Boolean: whether to parse magic words, etc. * @return string @@ -1650,8 +1650,8 @@ function wfMsgWikiHtml( $key ) { * * @deprecated since 1.18 * - * @param $key String: key of the message - * @param $options Array: processing rules. Can take the following options: + * @param string $key key of the message + * @param array $options processing rules. Can take the following options: * parse: parses wikitext to HTML * parseinline: parses wikitext to HTML and removes the surrounding * p's added by parser or tidy @@ -1759,7 +1759,7 @@ function wfEmptyMsg( $key ) { * Throw a debugging exception. This function previously once exited the process, * but now throws an exception instead, with similar results. * - * @param $msg String: message shown when dying. + * @param string $msg message shown when dying. * @throws MWException */ function wfDebugDieBacktrace( $msg = '' ) { @@ -1831,7 +1831,7 @@ function wfReportTime() { * debug_backtrace is disabled, otherwise the output from * debug_backtrace() (trimmed). * - * @param $limit int This parameter can be used to limit the number of stack frames returned + * @param int $limit This parameter can be used to limit the number of stack frames returned * * @return array of backtrace information */ @@ -1937,7 +1937,7 @@ function wfGetCaller( $level = 2 ) { * Return a string consisting of callers in the stack. Useful sometimes * for profiling specific points. * - * @param $limit int The maximum depth of the stack frame to return, or false for + * @param int $limit The maximum depth of the stack frame to return, or false for * the entire stack. * @return String */ @@ -1981,8 +1981,8 @@ function wfShowingResults( $offset, $limit ) { * @param $offset String * @param $limit Integer * @param $link String - * @param $query String: optional URL query parameter string - * @param $atend Bool: optional param for specified if this is the last page + * @param string $query optional URL query parameter string + * @param bool $atend optional param for specified if this is the last page * @return String * @deprecated in 1.19; use Language::viewPrevNext() instead */ @@ -2008,8 +2008,8 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) { /** * Make a list item, used by various special pages * - * @param $page String Page link - * @param $details String Text between brackets + * @param string $page Page link + * @param string $details Text between brackets * @param $oppositedm Boolean Add the direction mark opposite to your * language, to display text properly * @return String @@ -2058,8 +2058,8 @@ function wfClientAcceptsGzip( $force = false ) { * Obtain the offset and limit values from the request string; * used in special pages * - * @param $deflimit Int default limit if none supplied - * @param $optionname String Name of a user preference to check against + * @param int $deflimit default limit if none supplied + * @param string $optionname Name of a user preference to check against * @return array * */ @@ -2074,7 +2074,7 @@ function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) { * is achieved by substituting certain characters with HTML entities. * As required by the callers, "" is not used. * - * @param $text String: text to be escaped + * @param string $text text to be escaped * @return String */ function wfEscapeWikiText( $text ) { @@ -2247,7 +2247,7 @@ function wfClearOutputBuffers() { * factors * * @param $accept String - * @param $def String default + * @param string $def default * @return Array */ function wfAcceptToPrefs( $accept, $def = '*/*' ) { @@ -2307,8 +2307,8 @@ function mimeTypeMatch( $type, $avail ) { * array of type to preference (preference is a float between 0.0 and 1.0). * Wildcards in the types are acceptable. * - * @param $cprefs Array: client's acceptable type list - * @param $sprefs Array: server's offered types + * @param array $cprefs client's acceptable type list + * @param array $sprefs server's offered types * @return string * * @todo FIXME: Doesn't handle params like 'text/plain; charset=UTF-8' @@ -2544,9 +2544,9 @@ function wfTempDir() { /** * Make directory, and make all parent directories if they don't exist * - * @param $dir String: full path to directory to create + * @param string $dir full path to directory to create * @param $mode Integer: chmod value to use, default is $wgDirectoryMode - * @param $caller String: optional caller param for debugging. + * @param string $caller optional caller param for debugging. * @throws MWException * @return bool */ @@ -2671,9 +2671,9 @@ function wfIniGetBool( $setting ) { * Wrapper function for PHP's dl(). This doesn't work in most situations from * PHP 5.3 onward, and is usually disabled in shared environments anyway. * - * @param $extension String A PHP extension. The file suffix (.so or .dll) + * @param string $extension A PHP extension. The file suffix (.so or .dll) * should be omitted - * @param $fileName String Name of the library, if not $extension.suffix + * @param string $fileName Name of the library, if not $extension.suffix * @return Bool - Whether or not the extension is loaded */ function wfDl( $extension, $fileName = null ) { @@ -2766,12 +2766,12 @@ function wfEscapeShellArg( ) { /** * Execute a shell command, with time and memory limits mirrored from the PHP * configuration if supported. - * @param $cmd String Command line, properly escaped for shell. + * @param string $cmd Command line, properly escaped for shell. * @param &$retval null|Mixed optional, will receive the program's exit code. * (non-zero is usually failure) - * @param $environ Array optional environment variables which should be + * @param array $environ optional environment variables which should be * added to the executed command environment. - * @param $limits Array optional array with limits(filesize, memory, time, walltime) + * @param array $limits optional array with limits(filesize, memory, time, walltime) * this overwrites the global wgShellMax* limits. * @return string collected stdout as a string (trailing newlines stripped) */ @@ -2890,9 +2890,9 @@ function wfShellMaintenanceCmd( $script, array $parameters = array(), array $opt * Generate a shell-escaped command line string to run a MediaWiki cli script. * Note that $parameters should be a flat array and an option with an argument * should consist of two consecutive items in the array (do not use "--option value"). - * @param $script string MediaWiki cli script path - * @param $parameters Array Arguments and options to the script - * @param $options Array Associative array of options: + * @param string $script MediaWiki cli script path + * @param array $parameters Arguments and options to the script + * @param array $options Associative array of options: * 'php': The path to the php executable * 'wrapper': Path to a PHP wrapper to handle the maintenance script * @return Array @@ -2994,9 +2994,9 @@ function wfMerge( $old, $mine, $yours, &$result ) { * Returns unified plain-text diff of two texts. * Useful for machine processing of diffs. * - * @param $before String: the text before the changes. - * @param $after String: the text after the changes. - * @param $params String: command-line options for the diff command. + * @param string $before the text before the changes. + * @param string $after the text after the changes. + * @param string $params command-line options for the diff command. * @return String: unified diff of $before and $after */ function wfDiff( $before, $after, $params = '-u' ) { @@ -3117,7 +3117,7 @@ function wfUseMW( $req_ver ) { * We'll consider it so always, as we don't want '\s' in our Unix paths either. * * @param $path String - * @param $suffix String: to remove if present + * @param string $suffix to remove if present * @return String */ function wfBaseName( $path, $suffix = '' ) { @@ -3137,8 +3137,8 @@ function wfBaseName( $path, $suffix = '' ) { * May explode on non-matching case-insensitive paths, * funky symlinks, etc. * - * @param $path String: absolute destination path including target filename - * @param $from String: Absolute source path, directory only + * @param string $path absolute destination path including target filename + * @param string $from Absolute source path, directory only * @return String */ function wfRelativePath( $path, $from ) { @@ -3294,7 +3294,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t * Create an object with a given name and an array of construct parameters * * @param $name String - * @param $p Array: parameters + * @param array $p parameters * @return object * @deprecated since 1.18, warnings in 1.18, removal in 1.20 */ @@ -3484,7 +3484,7 @@ function wfSplitWikiID( $wiki ) { * belongs to. May contain a single string if the query is only * in one group. * - * @param $wiki String: the wiki ID, or false for the current wiki + * @param string $wiki the wiki ID, or false for the current wiki * * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request * will always return the same object, unless the underlying connection or load @@ -3502,7 +3502,7 @@ function &wfGetDB( $db, $groups = array(), $wiki = false ) { /** * Get a load balancer object. * - * @param $wiki String: wiki ID, or false for the current wiki + * @param string $wiki wiki ID, or false for the current wiki * @return LoadBalancer */ function wfGetLB( $wiki = false ) { @@ -3522,8 +3522,8 @@ function &wfGetLBFactory() { * Find a file. * Shortcut for RepoGroup::singleton()->findFile() * - * @param $title String or Title object - * @param $options array Associative array of options: + * @param string $title or Title object + * @param array $options Associative array of options: * time: requested time for an archived image, or false for the * current version. An image object will be returned which was * created at the specified time. @@ -3581,7 +3581,7 @@ function wfQueriesMustScale() { * extensions; this is a wrapper around $wgScriptExtension etc. * except for 'index' and 'load' which use $wgScript/$wgLoadScript * - * @param $script String: script filename, sans extension + * @param string $script script filename, sans extension * @return String */ function wfScript( $script = 'index' ) { @@ -3792,7 +3792,7 @@ function wfShorthandToInteger( $string = '' ) { * Get the normalised IETF language tag * See unit test for examples. * - * @param $code String: The language code. + * @param string $code The language code. * @return String: The language code which complying with BCP 47 standards. */ function wfBCP47( $code ) { @@ -3875,8 +3875,8 @@ function wfGetLangConverterCacheStorage() { /** * Call hook functions defined in $wgHooks * - * @param $event String: event name - * @param $args Array: parameters passed to hook functions + * @param string $event event name + * @param array $args parameters passed to hook functions * @return Boolean True if no handler aborted the hook */ function wfRunHooks( $event, $args = array() ) { @@ -3886,7 +3886,7 @@ function wfRunHooks( $event, $args = array() ) { /** * Wrapper around php's unpack. * - * @param $format String: The format string (See php's docs) + * @param string $format The format string (See php's docs) * @param $data: A binary string of binary data * @param $length integer or false: The minimun length of $data. This is to * prevent reading beyond the end of $data. false to disable the check. @@ -3928,9 +3928,9 @@ function wfUnpack( $format, $data, $length=false ) { * * Any subsequent links on the same line are considered to be exceptions, * i.e. articles where the image may occur inline. * - * @param $name string the image name to check + * @param string $name the image name to check * @param $contextTitle Title|bool the page on which the image occurs, if known - * @param $blacklist string wikitext of a file blacklist + * @param string $blacklist wikitext of a file blacklist * @return bool */ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) { diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 98e54f999a..23c5ca7780 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -190,10 +190,10 @@ class HTMLForm extends ContextSource { /** * Build a new HTMLForm from an array of field attributes - * @param $descriptor Array of Field constructs, as described above + * @param array $descriptor of Field constructs, as described above * @param $context IContextSource available since 1.18, will become compulsory in 1.18. * Obviates the need to call $form->setTitle() - * @param $messagePrefix String a prefix to go in front of default messages + * @param string $messagePrefix a prefix to go in front of default messages */ public function __construct( $descriptor, /*IContextSource*/ $context = null, $messagePrefix = '' ) { if ( $context instanceof IContextSource ) { @@ -248,7 +248,7 @@ class HTMLForm extends ContextSource { /** * Set format in which to display the form - * @param $format String the name of the format to use, must be one of + * @param string $format the name of the format to use, must be one of * $this->availableDisplayFormats * @throws MWException * @since 1.20 @@ -281,7 +281,7 @@ class HTMLForm extends ContextSource { /** * Initialise a new Object for the field * @param $fieldname string - * @param $descriptor string input Descriptor, as described above + * @param string $descriptor input Descriptor, as described above * @throws MWException * @return HTMLFormField subclass */ @@ -417,7 +417,7 @@ class HTMLForm extends ContextSource { /** * Set a callback to a function to do something with the form * once it's been successfully validated. - * @param $cb String function name. The function will be passed + * @param string $cb function name. The function will be passed * the output from HTMLForm::filterDataForSubmit, and must * return Bool true on success, Bool false if no submission * was attempted, or String HTML output to display on error. @@ -441,7 +441,7 @@ class HTMLForm extends ContextSource { /** * Set the introductory message, overwriting any existing message. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setIntro( $msg ) { @@ -452,7 +452,7 @@ class HTMLForm extends ContextSource { /** * Set the introductory message, overwriting any existing message. * @since 1.19 - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setPreText( $msg ) { @@ -462,7 +462,7 @@ class HTMLForm extends ContextSource { /** * Add introductory text. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function addPreText( $msg ) { @@ -472,8 +472,8 @@ class HTMLForm extends ContextSource { /** * Add header text, inside the form. - * @param $msg String complete text of message to display - * @param $section string The section to add the header to + * @param string $msg complete text of message to display + * @param string $section The section to add the header to * @return HTMLForm $this for chaining calls (since 1.20) */ function addHeaderText( $msg, $section = null ) { @@ -491,7 +491,7 @@ class HTMLForm extends ContextSource { /** * Set header text, inside the form. * @since 1.19 - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @param $section The section to add the header to * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -506,8 +506,8 @@ class HTMLForm extends ContextSource { /** * Add footer text, inside the form. - * @param $msg String complete text of message to display - * @param $section string The section to add the footer text to + * @param string $msg complete text of message to display + * @param string $section The section to add the footer text to * @return HTMLForm $this for chaining calls (since 1.20) */ function addFooterText( $msg, $section = null ) { @@ -525,8 +525,8 @@ class HTMLForm extends ContextSource { /** * Set footer text, inside the form. * @since 1.19 - * @param $msg String complete text of message to display - * @param $section string The section to add the footer text to + * @param string $msg complete text of message to display + * @param string $section The section to add the footer text to * @return HTMLForm $this for chaining calls (since 1.20) */ function setFooterText( $msg, $section = null ) { @@ -540,7 +540,7 @@ class HTMLForm extends ContextSource { /** * Add text to the end of the display. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function addPostText( $msg ) { @@ -550,7 +550,7 @@ class HTMLForm extends ContextSource { /** * Set text at the end of the display. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setPostText( $msg ) { @@ -560,8 +560,8 @@ class HTMLForm extends ContextSource { /** * Add a hidden field to the output - * @param $name String field name. This will be used exactly as entered - * @param $value String field value + * @param string $name field name. This will be used exactly as entered + * @param string $value field value * @param $attribs Array * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -573,9 +573,9 @@ class HTMLForm extends ContextSource { /** * Add a button to the form - * @param $name String field name. - * @param $value String field value - * @param $id String DOM id for the button (default: null) + * @param string $name field name. + * @param string $value field value + * @param string $id DOM id for the button (default: null) * @param $attribs Array * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -625,7 +625,7 @@ class HTMLForm extends ContextSource { /** * Wrap the form innards in an actual "
" element - * @param $html String HTML contents to wrap. + * @param string $html HTML contents to wrap. * @return String wrapped HTML. */ function wrapForm( $html ) { @@ -765,7 +765,7 @@ class HTMLForm extends ContextSource { /** * Format a stack of error messages into a single HTML string - * @param $errors Array of message keys/values + * @param array $errors of message keys/values * @return String HTML, a "