From f86a5590aae7fbe6d9b8a3d129c7a04a11a27579 Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Wed, 10 Dec 2014 05:09:35 +0000 Subject: [PATCH] Always use 'bool' instead of 'boolean' after '@param' and '@return' The former is by far the most common. Skipped: * resources/lib/jquery.ui/jquery.ui.datepicker.js * resources/src/mediawiki.special/mediawiki.special.upload.js Change-Id: I73c93797e745128ba703e4865080c36784caa474 --- includes/Title.php | 2 +- includes/api/ApiPageSet.php | 2 +- includes/api/ApiStashEdit.php | 2 +- includes/changes/OldChangesList.php | 2 +- includes/libs/GenericArrayObject.php | 6 +++--- includes/libs/IPSet.php | 2 +- includes/libs/XmlTypeCheck.php | 2 +- includes/resourceloader/ResourceLoaderSkinModule.php | 2 +- includes/specialpage/WantedQueryPage.php | 2 +- includes/specials/SpecialWantedfiles.php | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 638da08581..0a9b433979 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -747,7 +747,7 @@ class Title { * @param string $title The DB key form the title * @param string $fragment The link fragment (after the "#") * @param string $interwiki The interwiki prefix - * @param boolean $canoncialNamespace If true, use the canonical name for + * @param bool $canoncialNamespace If true, use the canonical name for * $ns instead of the localized version. * @return string The prefixed form of the title */ diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 39cd6d9542..c70629a920 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1213,7 +1213,7 @@ class ApiPageSet extends ApiBase { * * @param ApiResult|array &$result * @param array $path - * @return boolean Whether the data fit + * @return bool Whether the data fit */ public function populateGeneratorData( &$result, array $path = array() ) { if ( $result instanceof ApiResult ) { diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index b32d332966..2f9f37ec27 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -159,7 +159,7 @@ class ApiStashEdit extends ApiBase { * @param ParserOptions $pstOpts Options for $pstContent (MUST be for prospective author) * @param ParserOptions $pOpts Options for $pOut * @param string $timestamp TS_MW timestamp of parser output generation - * @return boolean Success + * @return bool Success */ public static function stashEditFromPreview( Page $page, Content $content, Content $pstContent, ParserOutput $pOut, diff --git a/includes/changes/OldChangesList.php b/includes/changes/OldChangesList.php index 4eed9262a8..c9602cc4c9 100644 --- a/includes/changes/OldChangesList.php +++ b/includes/changes/OldChangesList.php @@ -73,7 +73,7 @@ class OldChangesList extends ChangesList { /** * @param RecentChange $rc * @param string[] &$classes - * @param boolean $watched + * @param bool $watched * * @return string */ diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index db8a7ecfba..93ae83b272 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -117,7 +117,7 @@ abstract class GenericArrayObject extends ArrayObject { * * @param mixed $value * - * @return boolean + * @return bool */ protected function hasValidType( $value ) { $class = $this->getObjectType(); @@ -171,7 +171,7 @@ abstract class GenericArrayObject extends ArrayObject { * @param integer|string $index * @param mixed $value * - * @return boolean + * @return bool */ protected function preSetElement( $index, $value ) { return true; @@ -232,7 +232,7 @@ abstract class GenericArrayObject extends ArrayObject { * * @since 1.20 * - * @return boolean + * @return bool */ public function isEmpty() { return $this->count() === 0; diff --git a/includes/libs/IPSet.php b/includes/libs/IPSet.php index 3b9f1a83b4..c1c841e634 100644 --- a/includes/libs/IPSet.php +++ b/includes/libs/IPSet.php @@ -162,7 +162,7 @@ class IPSet { * Match an IP address against the set * * @param string $ip string IPv[46] address - * @return boolean true is match success, false is match failure + * @return bool true is match success, false is match failure * * If $ip is unparseable, inet_pton may issue an E_WARNING to that effect */ diff --git a/includes/libs/XmlTypeCheck.php b/includes/libs/XmlTypeCheck.php index aca857e9fa..0d6c3a6b6d 100644 --- a/includes/libs/XmlTypeCheck.php +++ b/includes/libs/XmlTypeCheck.php @@ -70,7 +70,7 @@ class XmlTypeCheck { * SAX element handler event. This gives you access to the element * namespace, name, attributes, and text contents. * Filter should return 'true' to toggle on $this->filterMatch - * @param boolean $isFile (optional) indicates if the first parameter is a + * @param bool $isFile (optional) indicates if the first parameter is a * filename (default, true) or if it is a string (false) * @param array $options list of additional parsing options: * processing_instruction_handler: Callback for xml_set_processing_instruction_handler diff --git a/includes/resourceloader/ResourceLoaderSkinModule.php b/includes/resourceloader/ResourceLoaderSkinModule.php index 6de1be0d2d..983593269b 100644 --- a/includes/resourceloader/ResourceLoaderSkinModule.php +++ b/includes/resourceloader/ResourceLoaderSkinModule.php @@ -41,7 +41,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule { /** * @param $context ResourceLoaderContext - * @return boolean + * @return bool */ public function isKnownEmpty( ResourceLoaderContext $context ) { // Regardless of whether the files are specified, we always diff --git a/includes/specialpage/WantedQueryPage.php b/includes/specialpage/WantedQueryPage.php index ce28de53dc..c4140de1d8 100644 --- a/includes/specialpage/WantedQueryPage.php +++ b/includes/specialpage/WantedQueryPage.php @@ -109,7 +109,7 @@ abstract class WantedQueryPage extends QueryPage { * @note This will only be run if the page is cached (ie $wgMiserMode = true) * unless forceExistenceCheck() is true. * @since 1.24 - * @return boolean + * @return bool */ protected function existenceCheck( Title $title ) { return $title->isKnown(); diff --git a/includes/specials/SpecialWantedfiles.php b/includes/specials/SpecialWantedfiles.php index 16127d9e9d..8a1a6c6c43 100644 --- a/includes/specials/SpecialWantedfiles.php +++ b/includes/specials/SpecialWantedfiles.php @@ -99,7 +99,7 @@ class WantedFilesPage extends WantedQueryPage { * Use wfFindFile so we still think file namespace pages without * files are missing, but valid file redirects and foreign files are ok. * - * @return boolean + * @return bool */ protected function existenceCheck( Title $title ) { return (bool)wfFindFile( $title ); -- 2.20.1