From 23bb3d1cb48483ec6d6d94e90f99f08fef1d5865 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 23 Apr 2014 13:39:49 +0200 Subject: [PATCH] Follow-Ups to "Fixed some @params documentation" Fix of inline comments of the following patch sets: Follow-Up: I0056b4a8df243cfc0c5f25378de48f7a35170aca Follow-Up: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5 Follow-Up: I3622f216a2ca8ac1b5e51892be9f98665f65bc36 Follow-Up: I6627ba0e76d3577c40bf2473e0f78a5ad7368634 Follow-Up: Id75b5ecf648ca50f955b3bde3307c82c4366b102 Follow-Up: I4ca5231119f33039d91da3b57a41cd40719a576b Change-Id: Id9bbe84b2820e9db44af5783411e955f55f643d4 --- includes/Article.php | 8 ++--- includes/AuthPlugin.php | 2 +- includes/CategoryViewer.php | 4 +-- includes/ChangeTags.php | 2 +- includes/Collation.php | 4 +-- includes/Linker.php | 2 +- includes/Namespace.php | 2 +- includes/QueryPage.php | 2 +- includes/SiteConfiguration.php | 2 +- includes/Skin.php | 4 +-- includes/SquidPurgeClient.php | 1 + includes/Title.php | 32 +++++++++---------- includes/UserMailer.php | 2 +- includes/WatchedItem.php | 2 +- includes/WebRequest.php | 10 +++--- includes/WikiPage.php | 8 ++--- includes/Xml.php | 4 +-- includes/api/ApiDelete.php | 2 +- includes/api/ApiFormatBase.php | 2 +- includes/content/Content.php | 2 +- includes/content/TextContent.php | 2 +- includes/db/DatabaseMysqlBase.php | 2 +- includes/deferred/SearchUpdate.php | 2 +- includes/htmlform/HTMLForm.php | 2 +- includes/media/MediaHandler.php | 4 +-- includes/media/MediaTransformOutput.php | 4 +-- includes/objectcache/XCacheBagOStuff.php | 2 +- includes/profiler/Profiler.php | 4 +-- includes/specials/SpecialAllpages.php | 10 +++--- includes/specials/SpecialPrefixindex.php | 2 +- includes/upload/UploadBase.php | 2 +- maintenance/backupTextPass.inc | 2 +- .../includes/specials/SpecialSearchTest.php | 4 +-- tests/phpunit/maintenance/DumpTestCase.php | 2 +- 34 files changed, 71 insertions(+), 70 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 1537ea66bf..e73fe9d640 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -90,7 +90,7 @@ class Article implements Page { /** * URL to redirect to or false if none - * @var string|false $mRedirectUrl + * @var string|bool $mRedirectUrl */ var $mRedirectUrl = false; // !< @@ -372,7 +372,7 @@ class Article implements Page { * uses this method to retrieve page text from the database, so the function * has to remain public for now. * - * @return string|bool string containing article contents, or false if null + * @return string|bool String containing article contents, or false if null * @deprecated since 1.21, use WikiPage::getContent() instead */ function fetchContent() { #BC cruft! @@ -865,7 +865,7 @@ class Article implements Page { * @param string $action The action= GET parameter * @param ParserOutput|null $pOutput * @return array The policy that should be set - * TODO: actions other than 'view' + * @todo: actions other than 'view' */ public function getRobotPolicy( $action, $pOutput = null ) { global $wgArticleRobotPolicies, $wgNamespaceRobotPolicies, $wgDefaultRobotPolicy; @@ -944,7 +944,7 @@ class Article implements Page { * Converts a String robot policy into an associative array, to allow * merging of several policies using array_merge(). * @param array|string $policy Returns empty array on null/false/'', transparent - * to already-converted arrays, converts String. + * to already-converted arrays, converts string. * @return array 'index' => \, 'follow' => \ */ public static function formatRobotPolicy( $policy ) { diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 0ce3cf96d0..45ad4d1bd1 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -204,7 +204,7 @@ class AuthPlugin { * Update user information in the external authentication database. * Return true if successful. * - * @param User $user User object. + * @param User $user * @return bool */ public function updateExternalDB( $user ) { diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index cee3f5b37f..305a8e5113 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -508,7 +508,7 @@ class CategoryViewer extends ContextSource { * supports those. * * @param array $articles - * @param array $articles_start_char + * @param string[] $articles_start_char * @return string * @private */ @@ -564,7 +564,7 @@ class CategoryViewer extends ContextSource { /** * Format a list of articles chunked by letter in a bullet list. * @param array $articles - * @param array $articles_start_char + * @param string[] $articles_start_char * @return string * @private */ diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 3818c96649..d3dd51aa54 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -297,7 +297,7 @@ class ChangeTags { * * Tries memcached first. * - * @return array Array of strings: tags + * @return string[] Array of strings: tags */ public static function listDefinedTags() { // Caching... diff --git a/includes/Collation.php b/includes/Collation.php index 050ec63ffc..071a2785b1 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -551,7 +551,7 @@ class IcuCollation extends Collation { * This function will return false on older PHPs. * * @since 1.21 - * @return string|false + * @return string|bool */ static function getICUVersion() { return defined( 'INTL_ICU_VERSION' ) ? INTL_ICU_VERSION : false; @@ -562,7 +562,7 @@ class IcuCollation extends Collation { * currently in use, or false when it can't be determined. * * @since 1.21 - * @return string|false + * @return string|bool */ static function getUnicodeVersionForICU() { $icuVersion = IcuCollation::getICUVersion(); diff --git a/includes/Linker.php b/includes/Linker.php index cfa0158f4d..6433d19e8c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1679,7 +1679,7 @@ class Linker { * Wraps the TOC in a table and provides the hide/collapse javascript. * * @param string $toc Html of the Table Of Contents - * @param string|Language|false $lang Language for the toc title, defaults to user language + * @param string|Language|bool $lang Language for the toc title, defaults to user language * @return string Full html of the TOC */ public static function tocList( $toc, $lang = false ) { diff --git a/includes/Namespace.php b/includes/Namespace.php index bfd41b6945..45c2da9cff 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -232,7 +232,7 @@ class MWNamespace { * Returns the canonical (English) name for a given index * * @param int $index Namespace index - * @return string|false If no canonical definition. + * @return string|bool If no canonical definition. */ public static function getCanonicalName( $index ) { $nslist = self::getCanonicalNamespaces(); diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 793ac55681..cf0a644671 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -53,7 +53,7 @@ abstract class QueryPage extends SpecialPage { protected $cachedTimestamp = null; /** - * Wheter to show prev/next links + * Whether to show prev/next links */ protected $shownavigation = true; diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index d750ca8d54..2f28e7b7f5 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -499,7 +499,7 @@ class SiteConfiguration { * * @param string $wiki * @param array|string $settings A setting name or array of setting names - * @return array|mixed Array if $settings is an array, otherwise the value + * @return mixed|mixed[] Array if $settings is an array, otherwise the value * @throws MWException * @since 1.21 */ diff --git a/includes/Skin.php b/includes/Skin.php index f63d4d2637..d3fa60773b 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -315,7 +315,7 @@ abstract class Skin extends ContextSource { /** * Set the "relevant" title * @see self::getRelevantTitle() - * @param Title $t Title object to use + * @param Title $t */ public function setRelevantTitle( $t ) { $this->mRelevantTitle = $t; @@ -341,7 +341,7 @@ abstract class Skin extends ContextSource { /** * Set the "relevant" user * @see self::getRelevantUser() - * @param User $u User object to use + * @param User $u */ public function setRelevantUser( $u ) { $this->mRelevantUser = $u; diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php index 0997a7a7a3..6cd7828dc7 100644 --- a/includes/SquidPurgeClient.php +++ b/includes/SquidPurgeClient.php @@ -126,6 +126,7 @@ class SquidPurgeClient { /** * Get the host's IP address. * Does not support IPv6 at present due to the lack of a convenient interface in PHP. + * @throws MWException * @return string */ protected function getIP() { diff --git a/includes/Title.php b/includes/Title.php index c7069ad911..4dc03720dd 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -147,7 +147,7 @@ class Title { * @param string $key The database key, which has underscores * instead of spaces, possibly including namespace and * interwiki prefixes - * @return Title|null Title, or NULL on an error + * @return Title|null Title, or null on an error */ public static function newFromDBkey( $key ) { $t = new Title(); @@ -292,7 +292,7 @@ class Title { * * @param int $id The page_id corresponding to the Title to create * @param int $flags Use Title::GAID_FOR_UPDATE to use master - * @return Title|null The new object, or NULL on an error + * @return Title|null The new object, or null on an error */ public static function newFromID( $id, $flags = 0 ) { $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); @@ -313,8 +313,8 @@ class Title { /** * Make an array of titles from an array of IDs * - * @param array $ids Array of IDs - * @return array Array of Titles + * @param int[] $ids Array of IDs + * @return Title[] Array of Titles */ public static function newFromIDs( $ids ) { if ( !count( $ids ) ) { @@ -417,7 +417,7 @@ class Title { * @param string $title Database key form * @param string $fragment The link fragment (after the "#") * @param string $interwiki Interwiki prefix - * @return Title The new object, or NULL on an error + * @return Title The new object, or null on an error */ public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) { if ( !MWNamespace::exists( $ns ) ) { @@ -488,7 +488,7 @@ class Title { * have been resolved (up to $wgMaxRedirects times) * * @param string $text Text with possible redirect - * @return array Array of Titles, with the destination last + * @return Title[] Array of Titles, with the destination last * @deprecated since 1.21, use Content::getRedirectChain instead. */ public static function newFromRedirectArray( $text ) { @@ -502,7 +502,7 @@ class Title { * Get the prefixed DB key associated with an ID * * @param int $id The page_id of the article - * @return Title|null An object representing the article, or NULL if no such article was found + * @return Title|null An object representing the article, or null if no such article was found */ public static function nameOf( $id ) { $dbr = wfGetDB( DB_SLAVE ); @@ -755,7 +755,7 @@ class Title { * Determine whether the object refers to a page within * this project and is transcludable. * - * @return bool TRUE if this is transcludable + * @return bool True if this is transcludable */ public function isTrans() { if ( !$this->isExternal() ) { @@ -3293,7 +3293,7 @@ class Title { * @param array $options May be FOR UPDATE * @param string $table Table name * @param string $prefix Fields prefix - * @return array Array of Title objects linking here + * @return Title[] Array of Title objects linking here */ public function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) { if ( count( $options ) > 0 ) { @@ -3335,7 +3335,7 @@ class Title { * On heavily-used templates it will max out the memory. * * @param array $options May be FOR UPDATE - * @return array Array of Title the Title objects linking here + * @return Title[] Array of Title the Title objects linking here */ public function getTemplateLinksTo( $options = array() ) { return $this->getLinksTo( $options, 'templatelinks', 'tl' ); @@ -3412,7 +3412,7 @@ class Title { * On heavily-used templates it will max out the memory. * * @param array $options May be FOR UPDATE - * @return array Array of Title the Title objects used here + * @return Title[] Array of Title the Title objects used here */ public function getTemplateLinksFrom( $options = array() ) { return $this->getLinksFrom( $options, 'templatelinks', 'tl' ); @@ -3422,7 +3422,7 @@ class Title { * Get an array of Title objects referring to non-existent articles linked from this page * * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case) - * @return array Array of Title the Title objects + * @return Title[] Array of Title the Title objects */ public function getBrokenLinksFrom() { if ( $this->getArticleID() == 0 ) { @@ -3458,7 +3458,7 @@ class Title { * Get a list of URLs to purge from the Squid cache when this * page changes * - * @return array Array of String the URLs + * @return string[] Array of String the URLs */ public function getSquidURLs() { $urls = array( @@ -4172,7 +4172,7 @@ class Title { * * @param int $revId Revision ID. Get the revision that was before this one. * @param int $flags Title::GAID_FOR_UPDATE - * @return int|bool Old revision ID, or FALSE if none exists + * @return int|bool Old revision ID, or false if none exists */ public function getPreviousRevisionID( $revId, $flags = 0 ) { $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); @@ -4197,7 +4197,7 @@ class Title { * * @param int $revId Revision ID. Get the revision that was after this one. * @param int $flags Title::GAID_FOR_UPDATE - * @return int|bool Next revision ID, or FALSE if none exists + * @return int|bool Next revision ID, or false if none exists */ public function getNextRevisionID( $revId, $flags = 0 ) { $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); @@ -4707,7 +4707,7 @@ class Title { /** * Get all extant redirects to this Title * - * @param int|null $ns Single namespace to consider; NULL to consider all namespaces + * @param int|null $ns Single namespace to consider; null to consider all namespaces * @return Title[] Array of Title redirects to this title */ public function getRedirectsHere( $ns = null ) { diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 41c68c0c12..2094b6275b 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -878,7 +878,7 @@ class EmailNotification { /** * Same as sendPersonalised but does impersonal mail suitable for bulk * mailing. Takes an array of MailAddress objects. - * @param array $addresses + * @param MailAddress[] $addresses * @return Status|null */ function sendImpersonal( $addresses ) { diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index 749a354f0a..9f2b498873 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -168,7 +168,7 @@ class WatchedItem { /** * Get the notification timestamp of this entry. * - * @return false|null|string false if the page is not watched, the value of + * @return bool|null|string False if the page is not watched, the value of * the wl_notificationtimestamp field otherwise */ public function getNotificationTimestamp() { diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 9a9cdf16bc..9bc464ad4d 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -371,7 +371,7 @@ class WebRequest { * selected by a drop-down menu). For freeform input, see getText(). * * @param string $name - * @param string $default Optional default (or NULL) + * @param string $default Optional default (or null) * @return string */ public function getVal( $name, $default = null ) { @@ -418,10 +418,10 @@ class WebRequest { /** * Fetch an array from the input or return $default if it's not set. * If source was scalar, will return an array with a single element. - * If no source and no default, returns NULL. + * If no source and no default, returns null. * * @param string $name - * @param array $default Optional default (or NULL) + * @param array $default Optional default (or null) * @return array */ public function getArray( $name, $default = null ) { @@ -436,11 +436,11 @@ class WebRequest { /** * Fetch an array of integers, or return $default if it's not set. * If source was scalar, will return an array with a single element. - * If no source and no default, returns NULL. + * If no source and no default, returns null. * If an array is returned, contents are guaranteed to be integers. * * @param string $name - * @param array $default option default (or NULL) + * @param array $default Option default (or null) * @return array Array of ints */ public function getIntArray( $name, $default = null ) { diff --git a/includes/WikiPage.php b/includes/WikiPage.php index e84f8de6cd..8e15ac9271 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -306,7 +306,7 @@ class WikiPage implements Page, IDBAccessObject { * @param DatabaseBase $dbr * @param array $conditions * @param array $options - * @return object|false Database result resource, or false on failure + * @return object|bool Database result resource, or false on failure */ protected function pageData( $dbr, $conditions, $options = array() ) { $fields = self::selectFields(); @@ -327,7 +327,7 @@ class WikiPage implements Page, IDBAccessObject { * @param DatabaseBase $dbr * @param Title $title * @param array $options - * @return object|false Database result resource, or false on failure + * @return object|bool Database result resource, or false on failure */ public function pageDataFromTitle( $dbr, $title, $options = array() ) { return $this->pageData( $dbr, array( @@ -341,7 +341,7 @@ class WikiPage implements Page, IDBAccessObject { * @param DatabaseBase $dbr * @param int $id * @param array $options - * @return object|false Database result resource, or false on failure + * @return object|bool Database result resource, or false on failure */ public function pageDataFromId( $dbr, $id, $options = array() ) { return $this->pageData( $dbr, array( 'page_id' => $id ), $options ); @@ -685,7 +685,7 @@ class WikiPage implements Page, IDBAccessObject { * Revision::RAW get the text regardless of permissions * @param User $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter - * @return string|false The text of the current revision + * @return string|bool The text of the current revision * @deprecated since 1.21, getContent() should be used instead. */ public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) { // @todo deprecated, replace usage! diff --git a/includes/Xml.php b/includes/Xml.php index 66d9cb5135..6510eaecdb 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -32,7 +32,7 @@ class Xml { * * @param string $element Element name * @param array $attribs Name=>value pairs. Values will be escaped. - * @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default) + * @param string $contents Null to make an open tag only; '' for a contentless closed tag (default) * @param bool $allowShortTag Whether '' in $contents will result in a contentless closed tag * @return string */ @@ -83,7 +83,7 @@ class Xml { * * @param string $element * @param array $attribs Name=>value pairs. Values will be escaped. - * @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default) + * @param string $contents Null to make an open tag only; '' for a contentless closed tag (default) * @return string */ public static function elementClean( $element, $attribs = array(), $contents = '' ) { diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 116c8cd38e..2fa4518ad4 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -105,7 +105,7 @@ class ApiDelete extends ApiBase { * @param Page|WikiPage $page Page or WikiPage object to work on * @param User $user User doing the action * @param string $token delete token (same as edit token) - * @param string|null $reason reason for the deletion. Autogenerated if NULL + * @param string|null $reason reason for the deletion. Autogenerated if null * @return Status|array */ public static function delete( Page $page, User $user, $token, &$reason = null ) { diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index a255e6b539..15b97d8722 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -390,7 +390,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase { /** * ChannelFeed doesn't give us a method to print errors in a friendly * manner, so just punt errors to the default printer. - * @return false + * @return bool */ public function canPrintErrors() { return false; diff --git a/includes/content/Content.php b/includes/content/Content.php index 18110efd44..210c1177a7 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -48,7 +48,7 @@ interface Content { /** * @since 1.21 * - * @return string|false The wikitext to include when another page includes this + * @return string|bool The wikitext to include when another page includes this * content, or false if the content is not includable in a wikitext page. * * @todo Allow native handling, bypassing wikitext representation, like diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index b0da62df3f..b13b5fa94e 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -136,7 +136,7 @@ class TextContent extends AbstractContent { * * @note: this allows any text-based content to be transcluded as if it was wikitext. * - * @return string|false The raw text, or false if the conversion failed. + * @return string|bool The raw text, or false if the conversion failed. */ public function getWikitextForTransclusion() { $wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' ); diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index df4be40724..837d0947e5 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -1296,7 +1296,7 @@ class MySQLMasterPos implements DBMasterPos { } /** - * @return array|false (int, int) + * @return array|bool (int, int) */ protected function getCoordinates() { $m = array(); diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index 6dc2e18dc0..9ae903422a 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -35,7 +35,7 @@ class SearchUpdate implements DeferrableUpdate { /** @var Title Title we're updating */ private $title; - /** @var Content|false Content of the page (not text) */ + /** @var Content|bool Content of the page (not text) */ private $content; /** diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index c7bac0d0a9..10c9ce03c1 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1075,7 +1075,7 @@ class HTMLForm extends ContextSource { * Prompt the whole form to be wrapped in a "
", with * this text as its "" element. * - * @param string|false $legend HTML to go inside the "" element, or + * @param string|bool $legend HTML to go inside the "" element, or * false for no * Will be escaped * diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 0c18821e7f..ab8fa14feb 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -776,7 +776,7 @@ abstract class MediaHandler { * Get list of languages file can be viewed in. * * @param File $file - * @return array Array of language codes, or empty array if unsupported. + * @return string[] Array of language codes, or empty array if unsupported. * @since 1.23 */ public function getAvailableLanguages( File $file ) { @@ -792,7 +792,7 @@ abstract class MediaHandler { * type do not support alternative language renderings. * * @param File $file - * @return string Language code or null if multi-language not supported for filetype. + * @return string|null Language code or null if multi-language not supported for filetype. * @since 1.23 */ public function getDefaultRenderLanguage( File $file ) { diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index f6f10d3da6..99eca62f8a 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -80,14 +80,14 @@ abstract class MediaTransformOutput { /** * Get the final extension of the thumbnail. * Returns false for scripted transformations. - * @return string|false + * @return string|bool */ public function getExtension() { return $this->path ? FileBackend::extensionFromPath( $this->path ) : false; } /** - * @return string|false The thumbnail URL + * @return string|bool The thumbnail URL */ public function getUrl() { return $this->url; diff --git a/includes/objectcache/XCacheBagOStuff.php b/includes/objectcache/XCacheBagOStuff.php index b12a40c7a4..8e2a160df9 100644 --- a/includes/objectcache/XCacheBagOStuff.php +++ b/includes/objectcache/XCacheBagOStuff.php @@ -101,7 +101,7 @@ class XCacheBagOStuff extends BagOStuff { * @param Closure $callback Callback method to be executed * @param int $exptime Either an interval in seconds or a unix timestamp for expiry * @param int $attempts The amount of times to attempt a merge in case of failure - * @return bool Cuccess + * @return bool Success */ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) { return $this->mergeViaLock( $key, $callback, $exptime, $attempts ); diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 1581879324..7f63bb2437 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -259,7 +259,7 @@ abstract class Profiler { * Get the initial time of the request, based either on $wgRequestTime or * $wgRUstart. Will return null if not able to find data. * - * @param string|false $metric Metric to use, with the following possibilities: + * @param string|bool $metric Metric to use, with the following possibilities: * - user: User CPU time (without system calls) * - cpu: Total CPU time (user and system calls) * - wall (or any other string): elapsed time @@ -288,7 +288,7 @@ abstract class Profiler { * Get the initial time of the request, based either on $wgRequestTime or * $wgRUstart. Will return null if not able to find data. * - * @param string|false $metric Metric to use, with the following possibilities: + * @param string|bool $metric Metric to use, with the following possibilities: * - user: User CPU time (without system calls) * - cpu: Total CPU time (user and system calls) * - wall (or any other string): elapsed time diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index a61c90daa8..fe49cf2445 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -78,7 +78,7 @@ class SpecialAllpages extends IncludableSpecialPage { /** * Entry point : initialise variables and call subfunctions. * - * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default NULL) + * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default null) */ function execute( $par ) { $request = $this->getRequest(); @@ -361,9 +361,9 @@ class SpecialAllpages extends IncludableSpecialPage { /** * @param int $namespace Namespace (Default NS_MAIN) - * @param string $from List all pages from this name (default FALSE) - * @param string $to List all pages to this name (default FALSE) - * @param bool $hideredirects Dont show redirects (default FALSE) + * @param string $from List all pages from this name (default false) + * @param string $to List all pages to this name (default false) + * @param bool $hideredirects Dont show redirects (default false) */ function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) { $output = $this->getOutput(); @@ -561,7 +561,7 @@ class SpecialAllpages extends IncludableSpecialPage { /** * @param int $ns The namespace of the article * @param string $text The name of the article - * @return array( int namespace, string dbkey, string pagename ) or NULL on error + * @return array( int namespace, string dbkey, string pagename ) or null on error */ protected function getNamespaceKeyAndText( $ns, $text ) { if ( $text == '' ) { diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 7bd98966d6..b6b60d4edb 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -155,7 +155,7 @@ class SpecialPrefixindex extends SpecialAllpages { /** * @param int $namespace Default NS_MAIN * @param string $prefix - * @param string $from List all pages from this name (default FALSE) + * @param string $from List all pages from this name (default false) */ protected function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) { global $wgContLang; diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 995cd7b481..746c16d0e2 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1388,7 +1388,7 @@ abstract class UploadBase { * $wgAntivirusRequired may be used to deny upload if the scan fails. * * @param string $file Pathname to the temporary upload file - * @return mixed False if not virus is found, NULL if the scan fails or is disabled, + * @return mixed False if not virus is found, null if the scan fails or is disabled, * or a string containing feedback from the virus scanner if a virus was found. * If textual feedback is missing but a virus was found, this function returns true. */ diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc index d210c3a363..d9c4d4f8d6 100644 --- a/maintenance/backupTextPass.inc +++ b/maintenance/backupTextPass.inc @@ -324,7 +324,7 @@ class TextPassDumper extends BackupDumper { /** * @throws MWException Failure to parse XML input - * @return true + * @return bool */ function readDump( $input ) { $this->buffer = ""; diff --git a/tests/phpunit/includes/specials/SpecialSearchTest.php b/tests/phpunit/includes/specials/SpecialSearchTest.php index 0fbb0597fa..8cbcf972da 100644 --- a/tests/phpunit/includes/specials/SpecialSearchTest.php +++ b/tests/phpunit/includes/specials/SpecialSearchTest.php @@ -13,8 +13,8 @@ class SpecialSearchTest extends MediaWikiTestCase { /** * @covers SpecialSearch::load * @dataProvider provideSearchOptionsTests - * @param array $requested Request parameters. For example array( 'ns5' => true, 'ns6' => true). NULL to use default options. - * @param array $userOptions User options to test with. For example array('searchNs5' => 1 );. NULL to use default options. + * @param array $requested Request parameters. For example array( 'ns5' => true, 'ns6' => true). Null to use default options. + * @param array $userOptions User options to test with. For example array('searchNs5' => 1 );. Null to use default options. * @param string $expectedProfile An expected search profile name * @param array $expectedNs Expected namespaces */ diff --git a/tests/phpunit/maintenance/DumpTestCase.php b/tests/phpunit/maintenance/DumpTestCase.php index 7d193f89d4..eff90f0d4c 100644 --- a/tests/phpunit/maintenance/DumpTestCase.php +++ b/tests/phpunit/maintenance/DumpTestCase.php @@ -234,7 +234,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase { * * @param string $name The name of the element to check for * (e.g.: "mediawiki" for ...) - * @param string|false $text If string, check if it equals the elements text. + * @param string|bool $text If string, check if it equals the elements text. * If false, ignore the element's text * @param bool $skip_ws (optional) if true, skip past white spaces that trail the * closing element. -- 2.20.1