From 1617e7822eaf74261687d2d2c3148ce10ab5da69 Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Thu, 24 Mar 2016 09:44:09 +0100 Subject: [PATCH] Always use 'bool' instead of 'boolean' in Doxygen tags Just like commit f86a5590aae7fbe6d9b8a3d129c7a04a11a27579 Change-Id: Ic9d08bca6524d6bb4baf5170c081ad0f3d738e28 --- includes/MergeHistory.php | 4 ++-- includes/TemplateParser.php | 2 +- includes/Title.php | 4 ++-- includes/api/ApiBase.php | 2 +- includes/api/ApiMain.php | 2 +- includes/api/ApiResult.php | 2 +- includes/filerepo/FileRepo.php | 4 ++-- includes/htmlform/VFormHTMLForm.php | 2 +- includes/libs/MWMessagePack.php | 2 +- includes/media/WebP.php | 6 +++--- includes/poolcounter/PoolCounter.php | 4 ++-- includes/resourceloader/ResourceLoaderRawFileModule.php | 2 +- includes/site/HashSiteStore.php | 4 ++-- includes/utils/BatchRowIterator.php | 4 ++-- includes/utils/MWCryptHash.php | 6 +++--- tests/phpunit/MediaWikiTestCase.php | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index a92056dda5..441fe9e2c0 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -51,7 +51,7 @@ class MergeHistory { /** @var string SQL WHERE condition that selects source revisions to insert into destination */ protected $timeWhere; - /** @var MWTimestamp|boolean Timestamp upto which history from the source will be merged */ + /** @var MWTimestamp|bool Timestamp upto which history from the source will be merged */ protected $timestampLimit; /** @var integer Number of revisions merged (for Special:MergeHistory success message) */ @@ -61,7 +61,7 @@ class MergeHistory { * MergeHistory constructor. * @param Title $source Page from which history will be merged * @param Title $dest Page to which history will be merged - * @param string|boolean $timestamp Timestamp up to which history from the source will be merged + * @param string|bool $timestamp Timestamp up to which history from the source will be merged */ public function __construct( Title $source, Title $dest, $timestamp = false ) { // Save the parameters diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php index 6420dc74c5..20142a784b 100644 --- a/includes/TemplateParser.php +++ b/includes/TemplateParser.php @@ -38,7 +38,7 @@ class TemplateParser { /** * @param string $templateDir - * @param boolean $forceRecompile + * @param bool $forceRecompile */ public function __construct( $templateDir = null, $forceRecompile = false ) { $this->templateDir = $templateDir ?: __DIR__ . '/templates'; diff --git a/includes/Title.php b/includes/Title.php index 262c6fa439..8bafe2612a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -145,7 +145,7 @@ class Title implements LinkTarget { /** @var bool The (string) language code of the page's language and content code. */ private $mPageLanguage = false; - /** @var string|boolean|null The page language code from the database, null if not saved in + /** @var string|bool|null The page language code from the database, null if not saved in * the database or false if not loaded, yet. */ private $mDbPageLanguage = false; @@ -4627,7 +4627,7 @@ class Title implements LinkTarget { * to true in LocalSettings.php, otherwise returns false. If there is no language saved in * the db, it will return NULL. * - * @return string|null|boolean + * @return string|null|bool */ private function getDbPageLanguageCode() { global $wgPageLanguageUseDB; diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 79441673c4..1c20229cca 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -437,7 +437,7 @@ abstract class ApiBase extends ContextSource { * RFC 7232 § 2.2 for semantics. * - etag: Return an entity-tag representing the state of all resources involved * in the request. Quotes must be included. See RFC 7232 § 2.3 for semantics. - * @return string|boolean|null As described above, or null if no value is available. + * @return string|bool|null As described above, or null if no value is available. */ public function getConditionalRequestData( $condition ) { return null; diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index df3f516700..63b79ac3eb 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -711,7 +711,7 @@ class ApiMain extends ApiBase { /** * Send caching headers - * @param boolean $isError Whether an error response is being output + * @param bool $isError Whether an error response is being output * @since 1.26 added $isError parameter */ protected function sendCacheHeaders( $isError ) { diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index 3436320133..5d5c829bf7 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -1150,7 +1150,7 @@ class ApiResult implements ApiSerializable { * the API. * * @param array $vars - * @param boolean $forceHash + * @param bool $forceHash * @return array */ public static function addMetadataToResultVars( $vars, $forceHash = true ) { diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 1565b49d21..15821ea4dd 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1906,7 +1906,7 @@ class FileRepo { /** * Returns whether or not storage is SHA-1 based - * @return boolean + * @return bool */ public function hasSha1Storage() { return $this->hasSha1Storage; @@ -1914,7 +1914,7 @@ class FileRepo { /** * Returns whether or not repo supports having originals SHA-1s in the thumb URLs - * @return boolean + * @return bool */ public function supportsSha1URLs() { return $this->supportsSha1URLs; diff --git a/includes/htmlform/VFormHTMLForm.php b/includes/htmlform/VFormHTMLForm.php index f0f961e299..c4466153a5 100644 --- a/includes/htmlform/VFormHTMLForm.php +++ b/includes/htmlform/VFormHTMLForm.php @@ -27,7 +27,7 @@ class VFormHTMLForm extends HTMLForm { /** * Wrapper and its legend are never generated in VForm mode. - * @var boolean + * @var bool */ protected $mWrapperLegend = false; diff --git a/includes/libs/MWMessagePack.php b/includes/libs/MWMessagePack.php index cd9aad8fe4..a9da3660b0 100644 --- a/includes/libs/MWMessagePack.php +++ b/includes/libs/MWMessagePack.php @@ -33,7 +33,7 @@ * @file */ class MWMessagePack { - /** @var boolean|null Whether current system is bigendian. **/ + /** @var bool|null Whether current system is bigendian. **/ public static $bigendian = null; /** diff --git a/includes/media/WebP.php b/includes/media/WebP.php index 8fda7511b7..6a01e8781c 100644 --- a/includes/media/WebP.php +++ b/includes/media/WebP.php @@ -154,7 +154,7 @@ class WebPHandler extends BitmapHandler { /** * Decodes a lossy chunk header * @param string $header Header string - * @return boolean|array See WebPHandler::decodeHeader + * @return bool|array See WebPHandler::decodeHeader */ protected static function decodeLossyChunkHeader( $header ) { // Bytes 0-3 are 'VP8 ' @@ -180,7 +180,7 @@ class WebPHandler extends BitmapHandler { /** * Decodes a lossless chunk header * @param string $header Header string - * @return boolean|array See WebPHandler::decodeHeader + * @return bool|array See WebPHandler::decodeHeader */ public static function decodeLosslessChunkHeader( $header ) { // Bytes 0-3 are 'VP8L' @@ -205,7 +205,7 @@ class WebPHandler extends BitmapHandler { /** * Decodes an extended chunk header * @param string $header Header string - * @return boolean|array See WebPHandler::decodeHeader + * @return bool|array See WebPHandler::decodeHeader */ public static function decodeExtendedChunkHeader( $header ) { // Bytes 0-3 are 'VP8X' diff --git a/includes/poolcounter/PoolCounter.php b/includes/poolcounter/PoolCounter.php index 1ec14aa148..acdbd81361 100644 --- a/includes/poolcounter/PoolCounter.php +++ b/includes/poolcounter/PoolCounter.php @@ -71,11 +71,11 @@ abstract class PoolCounter { protected $timeout; /** - * @var boolean Whether the key is a "might wait" key + * @var bool Whether the key is a "might wait" key */ private $isMightWaitKey; /** - * @var boolean Whether this process holds a "might wait" lock key + * @var bool Whether this process holds a "might wait" lock key */ private static $acquiredMightWaitKey = 0; diff --git a/includes/resourceloader/ResourceLoaderRawFileModule.php b/includes/resourceloader/ResourceLoaderRawFileModule.php index d9005fa5e2..beab53eb8d 100644 --- a/includes/resourceloader/ResourceLoaderRawFileModule.php +++ b/includes/resourceloader/ResourceLoaderRawFileModule.php @@ -31,7 +31,7 @@ class ResourceLoaderRawFileModule extends ResourceLoaderFileModule { /** * Enable raw mode to omit mw.loader.state() call as mw.loader * does not yet exist when these modules execute. - * @var boolean + * @var bool */ protected $raw = true; diff --git a/includes/site/HashSiteStore.php b/includes/site/HashSiteStore.php index 0d0e448fd1..198d331d95 100644 --- a/includes/site/HashSiteStore.php +++ b/includes/site/HashSiteStore.php @@ -50,7 +50,7 @@ class HashSiteStore implements SiteStore { * * @param Site $site * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSite( Site $site ) { $this->sites[$site->getGlobalId()] = $site; @@ -65,7 +65,7 @@ class HashSiteStore implements SiteStore { * * @param Site[] $sites * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSites( array $sites ) { foreach ( $sites as $site ) { diff --git a/includes/utils/BatchRowIterator.php b/includes/utils/BatchRowIterator.php index 002fd06e82..3bd3a4c3ec 100644 --- a/includes/utils/BatchRowIterator.php +++ b/includes/utils/BatchRowIterator.php @@ -166,14 +166,14 @@ class BatchRowIterator implements RecursiveIterator { } /** - * @return boolean True when the iterator is in a valid state + * @return bool True when the iterator is in a valid state */ public function valid() { return (bool)$this->current; } /** - * @return boolean True when this result set has rows + * @return bool True when this result set has rows */ public function hasChildren() { return $this->current && count( $this->current ); diff --git a/includes/utils/MWCryptHash.php b/includes/utils/MWCryptHash.php index 75eaedee0f..72c620eec0 100644 --- a/includes/utils/MWCryptHash.php +++ b/includes/utils/MWCryptHash.php @@ -70,7 +70,7 @@ class MWCryptHash { * Return the byte-length output of the hash algorithm we are * using in self::hash and self::hmac. * - * @param boolean $raw True to return the length for binary data, false to + * @param bool $raw True to return the length for binary data, false to * return for hex-encoded * @return int Number of bytes the hash outputs */ @@ -88,7 +88,7 @@ class MWCryptHash { * making use of the best hash algorithm that we have available. * * @param string $data - * @param boolean $raw True to return binary data, false to return it hex-encoded + * @param bool $raw True to return binary data, false to return it hex-encoded * @return string A hash of the data */ public static function hash( $data, $raw = true ) { @@ -101,7 +101,7 @@ class MWCryptHash { * * @param string $data * @param string $key - * @param boolean $raw True to return binary data, false to return it hex-encoded + * @param bool $raw True to return binary data, false to return it hex-encoded * @return string An hmac hash of the data + key */ public static function hmac( $data, $key, $raw = true ) { diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index dc6990260a..4d0e39c1d2 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -161,7 +161,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } /** - * @return boolean + * @return bool */ private function oncePerClass() { // Remember current test class in the database connection, -- 2.20.1