From: Umherirrender Date: Sun, 20 Aug 2017 11:20:59 +0000 (+0200) Subject: Use short type bool/int in param documentation X-Git-Tag: 1.31.0-rc.0~2357 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=3f1a52805e3cf801eda0357ee236de6b49a31c85;p=lhc%2Fweb%2Fwiklou.git Use short type bool/int in param documentation Enable the phpcs sniffs for this and used phpcbf Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925 --- diff --git a/includes/Block.php b/includes/Block.php index 843ea54484..5066038ba0 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1513,7 +1513,7 @@ class Block { * * @param string $cookieValue The string in which to find the ID. * - * @return integer|null The block ID, or null if the HMAC is present and invalid. + * @return int|null The block ID, or null if the HMAC is present and invalid. */ public static function getIdFromCookieValue( $cookieValue ) { // Extract the ID prefix from the cookie value (may be the whole value, if no bang found). diff --git a/includes/Category.php b/includes/Category.php index c22ea64abf..629962d2a9 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -48,7 +48,7 @@ class Category { /** * Set up all member variables using a database query. - * @param integer $mode + * @param int $mode * @throws MWException * @return bool True on success, false on failure. */ diff --git a/includes/EditPage.php b/includes/EditPage.php index 49341c5e7e..914e7aa6a9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -336,7 +336,7 @@ class EditPage { /** @var string */ public $edittime = ''; - /** @var integer */ + /** @var int */ private $editRevId = null; /** @var string */ @@ -1726,7 +1726,7 @@ class EditPage { * - spam (string): Spam string from content if any spam is detected by * matchSpamRegex. * - sectionanchor (string): Section anchor for a section save. - * - nullEdit (boolean): Set if doEditContent is OK. True if null edit, + * - nullEdit (bool): Set if doEditContent is OK. True if null edit, * false otherwise. * - redirect (bool): Set if doEditContent is OK. True if resulting * revision is a redirect. diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 4e471844d8..10b9e2b9ca 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -970,7 +970,7 @@ class MediaWiki { } /** - * @param integer $n Number of jobs to try to run + * @param int $n Number of jobs to try to run * @param LoggerInterface $runJobsLogger */ private function triggerSyncJobs( $n, LoggerInterface $runJobsLogger ) { @@ -979,7 +979,7 @@ class MediaWiki { } /** - * @param integer $n Number of jobs to try to run + * @param int $n Number of jobs to try to run * @param LoggerInterface $runJobsLogger * @return bool Success */ diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 48ff97bdf1..9d63869641 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -56,7 +56,7 @@ class MergeHistory { /** @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) */ + /** @var int Number of revisions merged (for Special:MergeHistory success message) */ protected $revisionsMerged; /** diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 2a3a7cd147..dd21194bdb 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1998,10 +1998,10 @@ class OutputPage extends ContextSource { * the TTL is higher the older the $mtime timestamp is. Essentially, the * TTL is 90% of the age of the object, subject to the min and max. * - * @param string|integer|float|bool|null $mtime Last-Modified timestamp - * @param integer $minTTL Mimimum TTL in seconds [default: 1 minute] - * @param integer $maxTTL Maximum TTL in seconds [default: $wgSquidMaxage] - * @return integer TTL in seconds + * @param string|int|float|bool|null $mtime Last-Modified timestamp + * @param int $minTTL Mimimum TTL in seconds [default: 1 minute] + * @param int $maxTTL Maximum TTL in seconds [default: $wgSquidMaxage] + * @return int TTL in seconds * @since 1.28 */ public function adaptCdnTTL( $mtime, $minTTL = 0, $maxTTL = 0 ) { diff --git a/includes/Revision.php b/includes/Revision.php index 3d4d161547..e457beb035 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -752,7 +752,7 @@ class Revision implements IDBAccessObject { * This should only be used for proposed revisions that turn out to be null edits * * @since 1.28 - * @param integer $id User ID + * @param int $id User ID * @param string $name User name */ public function setUserIdAndName( $id, $name ) { @@ -1584,7 +1584,7 @@ class Revision implements IDBAccessObject { * Get the text cache TTL * * @param WANObjectCache $cache - * @return integer + * @return int */ private static function getCacheTTL( WANObjectCache $cache ) { global $wgRevisionCacheExpiry; diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 6a2d0e2ada..ce87596a5f 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -294,7 +294,7 @@ class SiteStatsInit { /** * @param bool|IDatabase $database - * - boolean: Whether to use the master DB + * - bool: Whether to use the master DB * - IDatabase: Database connection to use */ public function __construct( $database = false ) { @@ -379,10 +379,10 @@ class SiteStatsInit { * for the original initStats, but without output. * * @param IDatabase|bool $database - * - boolean: Whether to use the master DB + * - bool: Whether to use the master DB * - IDatabase: Database connection to use * @param array $options Array of options, may contain the following values - * - activeUsers boolean: Whether to update the number of active users (default: false) + * - activeUsers bool: Whether to update the number of active users (default: false) */ public static function doAllAndCommit( $database, array $options = [] ) { $options += [ 'update' => false, 'activeUsers' => false ]; diff --git a/includes/StreamFile.php b/includes/StreamFile.php index cce3fc464b..71113a8691 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -38,7 +38,7 @@ class StreamFile { * @param array $headers Any additional headers to send if the file exists * @param bool $sendErrors Send error messages if errors occur (like 404) * @param array $optHeaders HTTP request header map (e.g. "range") (use lowercase keys) - * @param integer $flags Bitfield of STREAM_* constants + * @param int $flags Bitfield of STREAM_* constants * @throws MWException * @return bool Success */ @@ -64,7 +64,7 @@ class StreamFile { * Send out a standard 404 message for a file * * @param string $fname Full name and path of the file to stream - * @param integer $flags Bitfield of STREAM_* constants + * @param int $flags Bitfield of STREAM_* constants * @since 1.24 */ public static function send404Message( $fname, $flags = 0 ) { @@ -75,7 +75,7 @@ class StreamFile { * Convert a Range header value to an absolute (start, end) range tuple * * @param string $range Range header value - * @param integer $size File size + * @param int $size File size * @return array|string Returns error string on failure (start, end, length) * @since 1.24 */ diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 17b00933a1..480575ca26 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -163,7 +163,7 @@ class ApiParamInfo extends ApiBase { /** * List all submodules of a module * @param ApiBase $module - * @param boolean $recursive + * @param bool $recursive * @return string[] */ private function listAllSubmodules( ApiBase $module, $recursive ) { diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index c3f798fd49..b2528fe693 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -2131,7 +2131,7 @@ class AuthManager implements LoggerAwareInterface { * @param AuthenticationRequest[] &$reqs * @param string $action * @param string|null $username - * @param boolean $forceAction + * @param bool $forceAction */ private function fillRequests( array &$reqs, $action, $username, $forceAction = false ) { foreach ( $reqs as $req ) { diff --git a/includes/auth/CreateFromLoginAuthenticationRequest.php b/includes/auth/CreateFromLoginAuthenticationRequest.php index ddeb13d9d6..db827972cb 100644 --- a/includes/auth/CreateFromLoginAuthenticationRequest.php +++ b/includes/auth/CreateFromLoginAuthenticationRequest.php @@ -66,7 +66,7 @@ class CreateFromLoginAuthenticationRequest extends AuthenticationRequest { * Indicate whether this request contains any state for the specified * action. * @param string $action One of the AuthManager::ACTION_* constants - * @return boolean + * @return bool */ public function hasStateForAction( $action ) { switch ( $action ) { @@ -83,7 +83,7 @@ class CreateFromLoginAuthenticationRequest extends AuthenticationRequest { * Indicate whether this request contains state for the specified * action sufficient to replace other primary-required requests. * @param string $action One of the AuthManager::ACTION_* constants - * @return boolean + * @return bool */ public function hasPrimaryStateForAction( $action ) { switch ( $action ) { diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index b0a3a1c262..7ae2ee0e21 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -87,7 +87,7 @@ class HTMLFileCache extends FileCacheBase { /** * Check if pages can be cached for this request/user * @param IContextSource $context - * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28) + * @param int $mode One of the HTMLFileCache::MODE_* constants (since 1.28) * @return bool */ public static function useFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) { @@ -140,7 +140,7 @@ class HTMLFileCache extends FileCacheBase { /** * Read from cache to context output * @param IContextSource $context - * @param integer $mode One of the HTMLFileCache::MODE_* constants + * @param int $mode One of the HTMLFileCache::MODE_* constants * @return void */ public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) { diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 16c1ac55fc..768f980b26 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -253,7 +253,7 @@ class MessageCache { * is disabled. * * @param string $code Language to which load messages - * @param integer $mode Use MessageCache::FOR_UPDATE to skip process cache [optional] + * @param int $mode Use MessageCache::FOR_UPDATE to skip process cache [optional] * @throws MWException * @return bool */ @@ -396,7 +396,7 @@ class MessageCache { /** * @param string $code * @param array &$where List of wfDebug() comments - * @param integer $mode Use MessageCache::FOR_UPDATE to use DB_MASTER + * @param int $mode Use MessageCache::FOR_UPDATE to use DB_MASTER * @return bool|string True on success or one of ("cantacquire", "disabled") */ protected function loadFromDBWithLock( $code, array &$where, $mode = null ) { @@ -458,7 +458,7 @@ class MessageCache { * on-demand from the database later. * * @param string $code Language code - * @param integer $mode Use MessageCache::FOR_UPDATE to skip process cache + * @param int $mode Use MessageCache::FOR_UPDATE to skip process cache * @return array Loaded messages for storing in caches */ protected function loadFromDB( $code, $mode = null ) { @@ -755,7 +755,7 @@ class MessageCache { /** * @param string $key A language message cache key that stores blobs - * @param integer $timeout Wait timeout in seconds + * @param int $timeout Wait timeout in seconds * @return null|ScopedCallback */ protected function getReentrantScopedLock( $key, $timeout = self::WAIT_SEC ) { diff --git a/includes/collation/IcuCollation.php b/includes/collation/IcuCollation.php index d93362bcaa..54b04eead8 100644 --- a/includes/collation/IcuCollation.php +++ b/includes/collation/IcuCollation.php @@ -36,7 +36,7 @@ class IcuCollation extends Collation { /** @var Language */ protected $digitTransformLanguage; - /** @var boolean */ + /** @var bool */ private $useNumericCollation = false; /** @var array */ diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php index 6605c38d5a..d7dc45a537 100644 --- a/includes/config/EtcdConfig.php +++ b/includes/config/EtcdConfig.php @@ -45,11 +45,11 @@ class EtcdConfig implements Config, LoggerAwareInterface { private $directory; /** @var string */ private $encoding; - /** @var integer */ + /** @var int */ private $baseCacheTTL; - /** @var integer */ + /** @var int */ private $skewCacheTTL; - /** @var integer */ + /** @var int */ private $timeout; /** diff --git a/includes/dao/DBAccessObjectUtils.php b/includes/dao/DBAccessObjectUtils.php index cc63446cb3..ee10368521 100644 --- a/includes/dao/DBAccessObjectUtils.php +++ b/includes/dao/DBAccessObjectUtils.php @@ -28,8 +28,8 @@ */ class DBAccessObjectUtils implements IDBAccessObject { /** - * @param integer $bitfield - * @param integer $flags IDBAccessObject::READ_* constant + * @param int $bitfield + * @param int $flags IDBAccessObject::READ_* constant * @return bool Bitfield has flag $flag set */ public static function hasFlags( $bitfield, $flags ) { @@ -42,7 +42,7 @@ class DBAccessObjectUtils implements IDBAccessObject { * The fallback DB index and options are to be used if the entity is not found * with the initial DB index, typically querying the master DB to avoid lag * - * @param integer $bitfield Bitfield of IDBAccessObject::READ_* constants + * @param int $bitfield Bitfield of IDBAccessObject::READ_* constants * @return array List of DB indexes and options in this order: * - DB_MASTER or DB_REPLICA constant for the initial query * - SELECT options array for the initial query diff --git a/includes/dao/IDBAccessObject.php b/includes/dao/IDBAccessObject.php index 5acf3ae371..e18a090bcb 100644 --- a/includes/dao/IDBAccessObject.php +++ b/includes/dao/IDBAccessObject.php @@ -54,16 +54,16 @@ */ interface IDBAccessObject { /** Constants for object loading bitfield flags (higher => higher QoS) */ - /** @var integer Read from a replica DB/non-quorum */ + /** @var int Read from a replica DB/non-quorum */ const READ_NORMAL = 0; - /** @var integer Read from the master/quorum */ + /** @var int Read from the master/quorum */ const READ_LATEST = 1; - /* @var integer Read from the master/quorum and lock out other writers */ + /* @var int Read from the master/quorum and lock out other writers */ const READ_LOCKING = 3; // READ_LATEST (1) and "LOCK IN SHARE MODE" (2) - /** @var integer Read from the master/quorum and lock out other writers and locking readers */ + /** @var int Read from the master/quorum and lock out other writers and locking readers */ const READ_EXCLUSIVE = 7; // READ_LOCKING (3) and "FOR UPDATE" (4) - /** @var integer Read from a replica DB or without a quorum, using the master/quorum on miss */ + /** @var int Read from a replica DB or without a quorum, using the master/quorum on miss */ const READ_LATEST_IMMUTABLE = 8; // Convenience constant for tracking how data was loaded (higher => higher QoS) diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index e8f27ef233..40069f33c0 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -71,7 +71,7 @@ class DeferredUpdates { * In CLI mode, callback magic will also be used to run updates when safe * * @param DeferrableUpdate $update Some object that implements doUpdate() - * @param integer $stage DeferredUpdates constant (PRESEND or POSTSEND) (since 1.27) + * @param int $stage DeferredUpdates constant (PRESEND or POSTSEND) (since 1.27) */ public static function addUpdate( DeferrableUpdate $update, $stage = self::POSTSEND ) { global $wgCommandLineMode; @@ -105,7 +105,7 @@ class DeferredUpdates { * @see MWCallableUpdate::__construct() * * @param callable $callable - * @param integer $stage DeferredUpdates constant (PRESEND or POSTSEND) (since 1.27) + * @param int $stage DeferredUpdates constant (PRESEND or POSTSEND) (since 1.27) * @param IDatabase|null $dbw Abort if this DB is rolled back [optional] (since 1.28) */ public static function addCallableUpdate( @@ -118,7 +118,7 @@ class DeferredUpdates { * Do any deferred updates and clear the list * * @param string $mode Use "enqueue" to use the job queue when possible [Default: "run"] - * @param integer $stage DeferredUpdates constant (PRESEND, POSTSEND, or ALL) (since 1.27) + * @param int $stage DeferredUpdates constant (PRESEND, POSTSEND, or ALL) (since 1.27) */ public static function doUpdates( $mode = 'run', $stage = self::ALL ) { $stageEffective = ( $stage === self::ALL ) ? self::POSTSEND : $stage; @@ -165,7 +165,7 @@ class DeferredUpdates { * * @param DeferrableUpdate[] &$queue List of DeferrableUpdate objects * @param string $mode Use "enqueue" to use the job queue when possible - * @param integer $stage Class constant (PRESEND, POSTSEND) (since 1.28) + * @param int $stage Class constant (PRESEND, POSTSEND) (since 1.28) * @throws ErrorPageError Happens on top-level calls * @throws Exception Happens on second-level calls */ @@ -238,7 +238,7 @@ class DeferredUpdates { * @param DeferrableUpdate $update * @param LBFactory $lbFactory * @param string $mode - * @param integer $stage + * @param int $stage * @return ErrorPageError|null */ private static function runUpdate( @@ -322,7 +322,7 @@ class DeferredUpdates { } /** - * @return integer Number of enqueued updates + * @return int Number of enqueued updates * @since 1.28 */ public static function pendingUpdatesCount() { @@ -330,7 +330,7 @@ class DeferredUpdates { } /** - * @param integer $stage DeferredUpdates constant (PRESEND, POSTSEND, or ALL) + * @param int $stage DeferredUpdates constant (PRESEND, POSTSEND, or ALL) * @return DeferrableUpdate[] * @since 1.29 */ diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index 3dd9de6f91..f579a1f12f 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -29,7 +29,7 @@ use Wikimedia\Rdbms\IDatabase; class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { /** @var WikiPage */ protected $page; - /** @var integer */ + /** @var int */ protected $pageId; /** @var string */ protected $timestamp; @@ -39,7 +39,7 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { /** * @param WikiPage $page Page we are updating - * @param integer|null $pageId ID of the page we are updating [optional] + * @param int|null $pageId ID of the page we are updating [optional] * @param string|null $timestamp TS_MW timestamp of deletion * @throws MWException */ diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index c6facd9bf8..18a87e8bf2 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -192,7 +192,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate { * Acquire a lock for performing link table updates for a page on a DB * * @param IDatabase $dbw - * @param integer $pageId + * @param int $pageId * @param string $why One of (job, atomicity) * @return ScopedCallback * @throws RuntimeException diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index 60d760f3aa..bb5e4f4eda 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -33,7 +33,7 @@ class MWExceptionRenderer { /** * @param Exception|Throwable $e Original exception - * @param integer $mode MWExceptionExposer::AS_* constant + * @param int $mode MWExceptionExposer::AS_* constant * @param Exception|Throwable|null $eNew New exception from attempting to show the first */ public static function output( $e, $mode, $eNew = null ) { @@ -262,7 +262,7 @@ class MWExceptionRenderer { } /** - * @param integer $code + * @param int $code */ private static function statusHeader( $code ) { if ( !headers_sent() ) { diff --git a/includes/filerepo/FileBackendDBRepoWrapper.php b/includes/filerepo/FileBackendDBRepoWrapper.php index c37a942128..0d5a15d2f0 100644 --- a/includes/filerepo/FileBackendDBRepoWrapper.php +++ b/includes/filerepo/FileBackendDBRepoWrapper.php @@ -282,7 +282,7 @@ class FileBackendDBRepoWrapper extends FileBackend { /** * Get a connection to the repo file registry DB * - * @param integer $index + * @param int $index * @return DBConnRef */ protected function getDB( $index ) { diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 56ccc64499..55a19e8327 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -511,7 +511,7 @@ class ForeignAPIRepo extends FileRepo { * @param string $url * @param string $timeout * @param array $options - * @param integer|bool &$mtime Resulting Last-Modified UNIX timestamp if received + * @param int|bool &$mtime Resulting Last-Modified UNIX timestamp if received * @return bool|string */ public static function httpGet( diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 71e1c63480..460fe51e3f 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -862,7 +862,7 @@ abstract class File implements IDBAccessObject { * * Overridden by LocalFile to actually query the DB * - * @param integer $flags Bitfield of File::READ_* constants + * @param int $flags Bitfield of File::READ_* constants */ public function load( $flags = 0 ) { } diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 7293b99e38..465736bb06 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1893,7 +1893,7 @@ class HTMLForm extends ContextSource { * 'novalidate' attribute will be added on the `
` element. It will be removed if the user * agent has JavaScript support, in htmlform.js. * - * @return boolean + * @return bool * @since 1.29 */ public function needsJSForHtml5FormValidation() { diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 77ddc1a1b5..3f1c590908 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -357,7 +357,7 @@ abstract class HTMLFormField { * (wpFormIdentifier). * * @param WebRequest $request - * @return boolean + * @return bool */ protected function isSubmitAttempt( WebRequest $request ) { return $request->getCheck( 'wpEditToken' ) || $request->getCheck( 'wpFormIdentifier' ); @@ -1218,7 +1218,7 @@ abstract class HTMLFormField { * Whether this field requires the user agent to have JavaScript enabled for the client-side HTML5 * form validation to work correctly. * - * @return boolean + * @return bool * @since 1.29 */ public function needsJSForHtml5FormValidation() { diff --git a/includes/htmlform/fields/HTMLFormFieldWithButton.php b/includes/htmlform/fields/HTMLFormFieldWithButton.php index bcb07bd1c2..b2290ce3c1 100644 --- a/includes/htmlform/fields/HTMLFormFieldWithButton.php +++ b/includes/htmlform/fields/HTMLFormFieldWithButton.php @@ -6,7 +6,7 @@ class HTMLFormFieldWithButton extends HTMLFormField { /** @var string $mButtonClass CSS class for the button in this field */ protected $mButtonClass = ''; - /** @var string|integer $mButtonId Element ID for the button in this field */ + /** @var string|int $mButtonId Element ID for the button in this field */ protected $mButtonId = ''; /** @var string $mButtonName Name the button in this field */ diff --git a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php index 3a0063c3ed..3907fc65ec 100644 --- a/includes/jobqueue/jobs/CategoryMembershipChangeJob.php +++ b/includes/jobqueue/jobs/CategoryMembershipChangeJob.php @@ -34,7 +34,7 @@ use Wikimedia\Rdbms\LBFactory; * @since 1.27 */ class CategoryMembershipChangeJob extends Job { - /** @var integer|null */ + /** @var int|null */ private $ticket; const ENQUEUE_FUDGE_SEC = 60; diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 0c84a139f4..b4ead5d568 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -39,9 +39,9 @@ use Wikimedia\Rdbms\DBReplicationWaitError; class RefreshLinksJob extends Job { /** @var float Cache parser output when it takes this long to render */ const PARSE_THRESHOLD_SEC = 1.0; - /** @var integer Lag safety margin when comparing root job times to last-refresh times */ + /** @var int Lag safety margin when comparing root job times to last-refresh times */ const CLOCK_FUDGE = 10; - /** @var integer How many seconds to wait for replica DBs to catch up */ + /** @var int How many seconds to wait for replica DBs to catch up */ const LAG_WAIT_TIMEOUT = 15; function __construct( Title $title, array $params ) { diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index f76d9a2e8d..79d13741e2 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -45,7 +45,7 @@ abstract class GenericArrayObject extends ArrayObject { /** * @see SiteList::getNewOffset() * @since 1.20 - * @var integer + * @var int */ protected $indexOffset = 0; @@ -56,7 +56,7 @@ abstract class GenericArrayObject extends ArrayObject { * * @since 1.20 * - * @return integer + * @return int */ protected function getNewOffset() { while ( $this->offsetExists( $this->indexOffset ) ) { @@ -167,7 +167,7 @@ abstract class GenericArrayObject extends ArrayObject { * * @since 1.20 * - * @param integer|string $index + * @param int|string $index * @param mixed $value * * @return bool diff --git a/includes/libs/HashRing.php b/includes/libs/HashRing.php index a4aabcd3fe..be40965e84 100644 --- a/includes/libs/HashRing.php +++ b/includes/libs/HashRing.php @@ -35,7 +35,7 @@ class HashRing { protected $liveRing; /** @var Array (location => UNIX timestamp) */ protected $ejectionExpiries = []; - /** @var integer UNIX timestamp */ + /** @var int UNIX timestamp */ protected $ejectionNextExpiry = INF; const RING_SIZE = 268435456; // 2^28 @@ -93,7 +93,7 @@ class HashRing { * Get the location of an item on the ring, as well as the next locations * * @param string $item - * @param integer $limit Maximum number of locations to return + * @param int $limit Maximum number of locations to return * @return array List of locations */ public function getLocations( $item, $limit ) { @@ -152,7 +152,7 @@ class HashRing { * Remove a location from the "live" hash ring * * @param string $location - * @param integer $ttl Seconds + * @param int $ttl Seconds * @return bool Whether some non-ejected locations are left */ public function ejectFromLiveRing( $location, $ttl ) { @@ -218,7 +218,7 @@ class HashRing { * Get the location of an item on the "live" ring, as well as the next locations * * @param string $item - * @param integer $limit Maximum number of locations to return + * @param int $limit Maximum number of locations to return * @return array List of locations * @throws UnexpectedValueException */ diff --git a/includes/libs/MultiHttpClient.php b/includes/libs/MultiHttpClient.php index 6c48cee1ae..16168e6b59 100644 --- a/includes/libs/MultiHttpClient.php +++ b/includes/libs/MultiHttpClient.php @@ -50,13 +50,13 @@ class MultiHttpClient implements LoggerAwareInterface { protected $multiHandle = null; // curl_multi handle /** @var string|null SSL certificates path */ protected $caBundlePath; - /** @var integer */ + /** @var int */ protected $connTimeout = 10; - /** @var integer */ + /** @var int */ protected $reqTimeout = 300; /** @var bool */ protected $usePipelining = false; - /** @var integer */ + /** @var int */ protected $maxConnsPerHost = 50; /** @var string|null proxy */ protected $proxy; diff --git a/includes/libs/filebackend/HTTPFileStreamer.php b/includes/libs/filebackend/HTTPFileStreamer.php index a7d064b6e3..9730acb8cd 100644 --- a/includes/libs/filebackend/HTTPFileStreamer.php +++ b/includes/libs/filebackend/HTTPFileStreamer.php @@ -63,7 +63,7 @@ class HTTPFileStreamer { * @param array $headers Any additional headers to send if the file exists * @param bool $sendErrors Send error messages if errors occur (like 404) * @param array $optHeaders HTTP request header map (e.g. "range") (use lowercase keys) - * @param integer $flags Bitfield of STREAM_* constants + * @param int $flags Bitfield of STREAM_* constants * @throws MWException * @return bool Success */ @@ -179,7 +179,7 @@ class HTTPFileStreamer { * Send out a standard 404 message for a file * * @param string $fname Full name and path of the file to stream - * @param integer $flags Bitfield of STREAM_* constants + * @param int $flags Bitfield of STREAM_* constants * @since 1.24 */ public static function send404Message( $fname, $flags = 0 ) { @@ -202,7 +202,7 @@ class HTTPFileStreamer { * Convert a Range header value to an absolute (start, end) range tuple * * @param string $range Range header value - * @param integer $size File size + * @param int $size File size * @return array|string Returns error string on failure (start, end, length) * @since 1.24 */ diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index a262e0e18e..f834ccf937 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -47,7 +47,7 @@ use Wikimedia\WaitConditionLoop; abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { /** @var array[] Lock tracking */ protected $locks = []; - /** @var integer ERR_* class constant */ + /** @var int ERR_* class constant */ protected $lastError = self::ERR_NONE; /** @var string */ protected $keyspace = 'local'; @@ -55,7 +55,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { protected $logger; /** @var callback|null */ protected $asyncHandler; - /** @var integer Seconds */ + /** @var int Seconds */ protected $syncTimeout; /** @var bool */ @@ -70,7 +70,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { /** @var callable[] */ protected $busyCallbacks = []; - /** @var integer[] Map of (ATTR_* class constant => QOS_* class constant) */ + /** @var int[] Map of (ATTR_* class constant => QOS_* class constant) */ protected $attrMap = []; /** Possible values for getLastError() */ @@ -142,7 +142,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * @param string $key * @param int $ttl Time-to-live (seconds) * @param callable $callback Callback that derives the new value - * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] + * @param int $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed The cached value if found or the result of $callback otherwise * @since 1.27 */ @@ -172,8 +172,8 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * higher tiers using standard TTLs. * * @param string $key - * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] - * @param integer $oldFlags [unused] + * @param int $flags Bitfield of BagOStuff::READ_* constants [optional] + * @param int $oldFlags [unused] * @return mixed Returns false on failure and if the item does not exist */ public function get( $key, $flags = 0, $oldFlags = null ) { @@ -220,7 +220,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { /** * @param string $key - * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] + * @param int $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed Returns false on failure and if the item does not exist */ abstract protected function doGet( $key, $flags = 0 ); @@ -230,7 +230,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * * @param string $key * @param mixed &$casToken - * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] + * @param int $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed Returns false on failure and if the item does not exist * @throws Exception */ @@ -503,7 +503,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { /** * Get an associative array containing the item for each of the keys that have items. * @param array $keys List of strings - * @param integer $flags Bitfield; supports READ_LATEST [optional] + * @param int $flags Bitfield; supports READ_LATEST [optional] * @return array */ public function getMulti( array $keys, $flags = 0 ) { @@ -766,8 +766,8 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { } /** - * @param integer $flag ATTR_* class constant - * @return integer QOS_* class constant + * @param int $flag ATTR_* class constant + * @return int QOS_* class constant * @since 1.28 */ public function getQoS( $flag ) { @@ -778,7 +778,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * Merge the flag maps of one or more BagOStuff objects into a "lowest common denominator" map * * @param BagOStuff[] $bags - * @return integer[] Resulting flag map (class ATTR_* constant => class QOS_* constant) + * @return int[] Resulting flag map (class ATTR_* constant => class QOS_* constant) */ protected function mergeFlagMaps( array $bags ) { $map = []; diff --git a/includes/libs/objectcache/HashBagOStuff.php b/includes/libs/objectcache/HashBagOStuff.php index baa3c32c6a..6d583da07c 100644 --- a/includes/libs/objectcache/HashBagOStuff.php +++ b/includes/libs/objectcache/HashBagOStuff.php @@ -31,7 +31,7 @@ class HashBagOStuff extends BagOStuff { /** @var mixed[] */ protected $bag = []; - /** @var integer Max entries allowed */ + /** @var int Max entries allowed */ protected $maxCacheKeys; const KEY_VAL = 0; diff --git a/includes/libs/objectcache/MultiWriteBagOStuff.php b/includes/libs/objectcache/MultiWriteBagOStuff.php index 65f3a8afe5..200ab7969c 100644 --- a/includes/libs/objectcache/MultiWriteBagOStuff.php +++ b/includes/libs/objectcache/MultiWriteBagOStuff.php @@ -171,7 +171,7 @@ class MultiWriteBagOStuff extends BagOStuff { /** * Apply a write method to the first $count backing caches * - * @param integer $count + * @param int $count * @param bool $asyncWrites * @param string $method * @param mixed $args,... diff --git a/includes/libs/objectcache/RESTBagOStuff.php b/includes/libs/objectcache/RESTBagOStuff.php index 5d2577b16e..d3aa9f5cb1 100644 --- a/includes/libs/objectcache/RESTBagOStuff.php +++ b/includes/libs/objectcache/RESTBagOStuff.php @@ -57,7 +57,7 @@ class RESTBagOStuff extends BagOStuff { /** * @param string $key - * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] + * @param int $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed Returns false on failure and if the item does not exist */ protected function doGet( $key, $flags = 0 ) { diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index a80ed8d663..c1c9cc1a8a 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -92,11 +92,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { /** @var int ERR_* constant for the "last error" registry */ protected $lastRelayError = self::ERR_NONE; - /** @var integer Callback stack depth for getWithSetCallback() */ + /** @var int Callback stack depth for getWithSetCallback() */ private $callbackDepth = 0; /** @var mixed[] Temporary warm-up cache */ private $warmupCache = []; - /** @var integer Key fetched */ + /** @var int Key fetched */ private $warmupKeyMisses = 0; /** Max time expected to pass between delete() and DB commit finishing */ @@ -148,7 +148,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { const FLD_FLAGS = 4; // key to the flags bitfield const FLD_HOLDOFF = 5; // key to any hold-off TTL - /** @var integer Treat this value as expired-on-arrival */ + /** @var int Treat this value as expired-on-arrival */ const FLG_STALE = 1; const ERR_NONE = 0; // no error @@ -404,7 +404,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * * @param string $key Cache key * @param mixed $value - * @param integer $ttl Seconds to live. Special values are: + * @param int $ttl Seconds to live. Special values are: * - WANObjectCache::TTL_INDEFINITE: Cache forever * @param array $opts Options map: * - lag : Seconds of replica DB lag. Typically, this is either the replica DB lag @@ -537,7 +537,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * idempotence, the $ttl should not vary for different delete() calls on the same key. * * @param string $key Cache key - * @param integer $ttl Tombstone TTL; Default: WANObjectCache::HOLDOFF_TTL + * @param int $ttl Tombstone TTL; Default: WANObjectCache::HOLDOFF_TTL * @return bool True if the item was purged or not found, false on failure */ final public function delete( $key, $ttl = self::HOLDOFF_TTL ) { @@ -797,7 +797,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @see WANObjectCache::set() * * @param string $key Cache key - * @param integer $ttl Seconds to live for key updates. Special values are: + * @param int $ttl Seconds to live for key updates. Special values are: * - WANObjectCache::TTL_INDEFINITE: Cache forever * - WANObjectCache::TTL_UNCACHEABLE: Do not cache at all * @param callable $callback Value generation function @@ -929,7 +929,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @see WANObjectCache::getWithSetCallback() * * @param string $key - * @param integer $ttl + * @param int $ttl * @param callback $callback * @param array $opts Options map for getWithSetCallback() * @param float &$asOf Cache generation timestamp of returned value [returned] @@ -1098,7 +1098,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @endcode * * @param ArrayIterator $keyedIds Result of WANObjectCache::makeMultiKeys() - * @param integer $ttl Seconds to live for key updates + * @param int $ttl Seconds to live for key updates * @param callable $callback Callback the yields entity regeneration callbacks * @param array $opts Options map * @return array Map of (cache key => value) in the same order as $keyedIds @@ -1184,7 +1184,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @endcode * * @param ArrayIterator $keyedIds Result of WANObjectCache::makeMultiKeys() - * @param integer $ttl Seconds to live for key updates + * @param int $ttl Seconds to live for key updates * @param callable $callback Callback the yields entity regeneration callbacks * @param array $opts Options map * @return array Map of (cache key => value) in the same order as $keyedIds @@ -1393,8 +1393,8 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { } /** - * @param integer $flag ATTR_* class constant - * @return integer QOS_* class constant + * @param int $flag ATTR_* class constant + * @return int QOS_* class constant * @since 1.28 */ public function getQoS( $flag ) { @@ -1417,11 +1417,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * $ttl = $cache->adaptiveTTL( $mtime, $cache::TTL_DAY ); * @endcode * - * @param integer|float $mtime UNIX timestamp - * @param integer $maxTTL Maximum TTL (seconds) - * @param integer $minTTL Minimum TTL (seconds); Default: 30 + * @param int|float $mtime UNIX timestamp + * @param int $maxTTL Maximum TTL (seconds) + * @param int $minTTL Minimum TTL (seconds); Default: 30 * @param float $factor Value in the range (0,1); Default: .2 - * @return integer Adaptive TTL + * @return int Adaptive TTL * @since 1.28 */ public function adaptiveTTL( $mtime, $maxTTL, $minTTL = 30, $factor = .2 ) { @@ -1439,7 +1439,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { } /** - * @return integer Number of warmup key cache misses last round + * @return int Number of warmup key cache misses last round * @since 1.30 */ public function getWarmupKeyMisses() { @@ -1452,8 +1452,8 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * This must set the key to "PURGED::" * * @param string $key Cache key - * @param integer $ttl How long to keep the tombstone [seconds] - * @param integer $holdoff HOLDOFF_* constant controlling how long to ignore sets for this key + * @param int $ttl How long to keep the tombstone [seconds] + * @param int $holdoff HOLDOFF_* constant controlling how long to ignore sets for this key * @return bool Success */ protected function relayPurge( $key, $ttl, $holdoff ) { @@ -1540,8 +1540,8 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * and get hits too. Similar to worthRefreshExpiring(), randomization is used. * * @param float $asOf UNIX timestamp of the value - * @param integer $ageNew Age of key when this might recommend refreshing (seconds) - * @param integer $timeTillRefresh Age of key when it should be refreshed if popular (seconds) + * @param int $ageNew Age of key when this might recommend refreshing (seconds) + * @param int $timeTillRefresh Age of key when it should be refreshed if popular (seconds) * @param float $now The current UNIX timestamp * @return bool */ @@ -1590,7 +1590,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * Do not use this method outside WANObjectCache * * @param mixed $value - * @param integer $ttl [0=forever] + * @param int $ttl [0=forever] * @param float $now Unix Current timestamp just before calling set() * @return array */ diff --git a/includes/libs/objectcache/WANObjectCacheReaper.php b/includes/libs/objectcache/WANObjectCacheReaper.php index 1696c59414..14737b145a 100644 --- a/includes/libs/objectcache/WANObjectCacheReaper.php +++ b/includes/libs/objectcache/WANObjectCacheReaper.php @@ -48,7 +48,7 @@ class WANObjectCacheReaper implements LoggerAwareInterface { /** @var string */ protected $channel; - /** @var integer */ + /** @var int */ protected $initialStartWindow; /** diff --git a/includes/libs/rdbms/ChronologyProtector.php b/includes/libs/rdbms/ChronologyProtector.php index 8b1aabe3cd..f002d3eacc 100644 --- a/includes/libs/rdbms/ChronologyProtector.php +++ b/includes/libs/rdbms/ChronologyProtector.php @@ -61,9 +61,9 @@ class ChronologyProtector implements LoggerAwareInterface { /** @var float[] Map of (DB master name => 1) */ protected $shutdownTouchDBs = []; - /** @var integer Seconds to store positions */ + /** @var int Seconds to store positions */ const POSITION_TTL = 60; - /** @var integer Max time to wait for positions to appear */ + /** @var int Max time to wait for positions to appear */ const POS_WAIT_TIMEOUT = 5; /** diff --git a/includes/libs/rdbms/TransactionProfiler.php b/includes/libs/rdbms/TransactionProfiler.php index 8ac41611a3..af431a6787 100644 --- a/includes/libs/rdbms/TransactionProfiler.php +++ b/includes/libs/rdbms/TransactionProfiler.php @@ -99,7 +99,7 @@ class TransactionProfiler implements LoggerAwareInterface { * With conflicting expectations, the most narrow ones will be used * * @param string $event (writes,queries,conns,mConns) - * @param integer $value Maximum count of the event + * @param int $value Maximum count of the event * @param string $fname Caller * @since 1.25 */ @@ -199,7 +199,7 @@ class TransactionProfiler implements LoggerAwareInterface { * @param string $query Function name or generalized SQL * @param float $sTime Starting UNIX wall time * @param bool $isWrite Whether this is a write query - * @param integer $n Number of affected rows + * @param int $n Number of affected rows */ public function recordQueryCompletion( $query, $sTime, $isWrite = false, $n = 0 ) { $eTime = microtime( true ); @@ -266,7 +266,7 @@ class TransactionProfiler implements LoggerAwareInterface { * @param string $db DB name * @param string $id ID string of transaction * @param float $writeTime Time spent in write queries - * @param integer $affected Number of rows affected by writes + * @param int $affected Number of rows affected by writes */ public function transactionWritingOut( $server, $db, $id, $writeTime = 0.0, $affected = 0 ) { $name = "{$server} ({$db}) (TRX#$id)"; diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index cec13b50ee..01020e9456 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -108,7 +108,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware protected $mTablePrefix = ''; /** @var string */ protected $mSchema = ''; - /** @var integer */ + /** @var int */ protected $mFlags; /** @var array */ protected $mLBInfo = []; @@ -197,11 +197,11 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware */ private $mTrxWriteDuration = 0.0; /** - * @var integer Number of write queries for the current transaction + * @var int Number of write queries for the current transaction */ private $mTrxWriteQueryCount = 0; /** - * @var integer Number of rows affected by write queries for the current transaction + * @var int Number of rows affected by write queries for the current transaction */ private $mTrxWriteAffectedRows = 0; /** @@ -209,7 +209,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware */ private $mTrxWriteAdjDuration = 0.0; /** - * @var integer Number of write queries counted in mTrxWriteAdjDuration + * @var int Number of write queries counted in mTrxWriteAdjDuration */ private $mTrxWriteAdjQueryCount = 0; /** @@ -1054,7 +1054,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * * @param string $sql A SQL write query * @param float $runtime Total runtime, including RTT - * @param integer $affected Affected row count + * @param int $affected Affected row count */ private function updateTrxWriteQueryTime( $sql, $runtime, $affected ) { // Whether this is indicative of replica DB runtime (except for RBR or ws_repl) @@ -2591,7 +2591,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware /** * Do not use this method outside of Database/DBError classes * - * @param integer|string $errno + * @param int|string $errno * @return bool Whether the given query error was a connection drop */ public function wasConnectionError( $errno ) { @@ -2711,7 +2711,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * * This method should not be used outside of Database/LoadBalancer * - * @param integer $trigger IDatabase::TRIGGER_* constant + * @param int $trigger IDatabase::TRIGGER_* constant * @since 1.20 * @throws Exception */ @@ -2791,7 +2791,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * * This method should not be used outside of Database/LoadBalancer * - * @param integer $trigger IDatabase::TRIGGER_* constant + * @param int $trigger IDatabase::TRIGGER_* constant * @throws Exception * @since 1.20 */ diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index b82603e737..9375efc253 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -277,7 +277,7 @@ interface IDatabase { /** * Get the number of affected rows from pending write queries * - * @return integer + * @return int * @since 1.30 */ public function pendingWriteRowsAffected(); diff --git a/includes/libs/rdbms/database/position/MySQLMasterPos.php b/includes/libs/rdbms/database/position/MySQLMasterPos.php index 06776fe8fd..0657cf3dc0 100644 --- a/includes/libs/rdbms/database/position/MySQLMasterPos.php +++ b/includes/libs/rdbms/database/position/MySQLMasterPos.php @@ -24,7 +24,7 @@ class MySQLMasterPos implements DBMasterPos { /** * @param string $file Binlog file name - * @param integer $pos Binlog position + * @param int $pos Binlog position * @param string $gtid Comma separated GTID set [optional] */ function __construct( $file, $pos, $gtid = '' ) { diff --git a/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php index 4e28397455..298ec61934 100644 --- a/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php @@ -5,7 +5,7 @@ namespace Wikimedia\Rdbms; use stdClass; class MssqlResultWrapper extends ResultWrapper { - /** @var integer|null */ + /** @var int|null */ private $mSeekTo = null; /** diff --git a/includes/libs/rdbms/exception/DBQueryError.php b/includes/libs/rdbms/exception/DBQueryError.php index bc2a865bb1..6a4076f870 100644 --- a/includes/libs/rdbms/exception/DBQueryError.php +++ b/includes/libs/rdbms/exception/DBQueryError.php @@ -27,7 +27,7 @@ namespace Wikimedia\Rdbms; class DBQueryError extends DBExpectedError { /** @var string */ public $error; - /** @var integer */ + /** @var int */ public $errno; /** @var string */ public $sql; diff --git a/includes/libs/rdbms/lbfactory/ILBFactory.php b/includes/libs/rdbms/lbfactory/ILBFactory.php index ff6635d5bf..4cfa542466 100644 --- a/includes/libs/rdbms/lbfactory/ILBFactory.php +++ b/includes/libs/rdbms/lbfactory/ILBFactory.php @@ -138,7 +138,7 @@ interface ILBFactory { /** * Prepare all tracked load balancers for shutdown - * @param integer $mode One of the class SHUTDOWN_* constants + * @param int $mode One of the class SHUTDOWN_* constants * @param callable|null $workCallback Work to mask ChronologyProtector writes */ public function shutdown( diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index 1665a5ef7d..36de39e0fb 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -49,7 +49,7 @@ class LoadBalancer implements ILoadBalancer { private $mGroupLoads; /** @var bool Whether to disregard replica DB lag as a factor in replica DB selection */ private $mAllowLagged; - /** @var integer Seconds to spend waiting on replica DB lag to resolve */ + /** @var int Seconds to spend waiting on replica DB lag to resolve */ private $mWaitTimeout; /** @var array The LoadMonitor configuration */ private $loadMonitorConfig; @@ -79,7 +79,7 @@ class LoadBalancer implements ILoadBalancer { /** @var Database DB connection object that caused a problem */ private $errorConnection; - /** @var integer The generic (not query grouped) replica DB index (of $mServers) */ + /** @var int The generic (not query grouped) replica DB index (of $mServers) */ private $mReadIndex; /** @var bool|DBMasterPos False if not set */ private $mWaitForPos; @@ -91,7 +91,7 @@ class LoadBalancer implements ILoadBalancer { private $mLastError = 'Unknown error'; /** @var string|bool Reason the LB is read-only or false if not */ private $readOnlyReason = false; - /** @var integer Total connections opened */ + /** @var int Total connections opened */ private $connsOpened = 0; /** @var string|bool String if a requested DBO_TRX transaction round is active */ private $trxRoundId = false; @@ -111,17 +111,17 @@ class LoadBalancer implements ILoadBalancer { /** @var callable Exception logger */ private $errorLogger; - /** @var boolean */ + /** @var bool */ private $disabled = false; - /** @var boolean */ + /** @var bool */ private $chronProtInitialized = false; - /** @var integer Warn when this many connection are held */ + /** @var int Warn when this many connection are held */ const CONN_HELD_WARN_THRESHOLD = 10; - /** @var integer Default 'max lag' when unspecified */ + /** @var int Default 'max lag' when unspecified */ const MAX_LAG_DEFAULT = 10; - /** @var integer Seconds to cache master server read-only status */ + /** @var int Seconds to cache master server read-only status */ const TTL_CACHE_READONLY = 5; const KEY_LOCAL = 'local'; @@ -845,7 +845,7 @@ class LoadBalancer implements ILoadBalancer { * * @param int $i Server index * @param string $domain Domain ID to open - * @param integer $flags Class CONN_* constant bitfield + * @param int $flags Class CONN_* constant bitfield * @return Database */ private function openForeignConnection( $i, $domain, $flags = 0 ) { diff --git a/includes/libs/rdbms/loadmonitor/ILoadMonitor.php b/includes/libs/rdbms/loadmonitor/ILoadMonitor.php index fba5e135da..a0877a4677 100644 --- a/includes/libs/rdbms/loadmonitor/ILoadMonitor.php +++ b/includes/libs/rdbms/loadmonitor/ILoadMonitor.php @@ -58,7 +58,7 @@ interface ILoadMonitor extends LoggerAwareInterface { * * Values may be "false" if replication is too broken to estimate * - * @param integer[] $serverIndexes + * @param int[] $serverIndexes * @param string $domain * @return array Map of (server index => float|int|bool) */ diff --git a/includes/libs/rdbms/loadmonitor/LoadMonitor.php b/includes/libs/rdbms/loadmonitor/LoadMonitor.php index d4e73c9547..4db9e10278 100644 --- a/includes/libs/rdbms/loadmonitor/LoadMonitor.php +++ b/includes/libs/rdbms/loadmonitor/LoadMonitor.php @@ -205,7 +205,7 @@ class LoadMonitor implements ILoadMonitor { } /** - * @param integer $index Server index + * @param int $index Server index * @param IDatabase|null $conn Connection handle or null on connection failure * @return float */ diff --git a/includes/libs/stats/BufferingStatsdDataFactory.php b/includes/libs/stats/BufferingStatsdDataFactory.php index 73c6a8f55c..d75d9c0b1e 100644 --- a/includes/libs/stats/BufferingStatsdDataFactory.php +++ b/includes/libs/stats/BufferingStatsdDataFactory.php @@ -101,7 +101,7 @@ class BufferingStatsdDataFactory extends StatsdDataFactory implements IBuffering /** * Check whether this data factory has any data. - * @return boolean + * @return bool */ public function hasData() { return !empty( $this->buffer ); diff --git a/includes/libs/stats/IBufferingStatsdDataFactory.php b/includes/libs/stats/IBufferingStatsdDataFactory.php index 64ee2676f6..f77b26cefb 100644 --- a/includes/libs/stats/IBufferingStatsdDataFactory.php +++ b/includes/libs/stats/IBufferingStatsdDataFactory.php @@ -10,7 +10,7 @@ use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; interface IBufferingStatsdDataFactory extends StatsdDataFactoryInterface { /** * Check whether this data factory has any data. - * @return boolean + * @return bool */ public function hasData(); diff --git a/includes/libs/stats/NullStatsdDataFactory.php b/includes/libs/stats/NullStatsdDataFactory.php index 75d6b9e7eb..73697514e5 100644 --- a/includes/libs/stats/NullStatsdDataFactory.php +++ b/includes/libs/stats/NullStatsdDataFactory.php @@ -76,7 +76,7 @@ class NullStatsdDataFactory implements IBufferingStatsdDataFactory { * This function creates a 'updateCount' StatsdData object. * * @param string|array $key The metric(s) to decrement. - * @param integer $delta The delta to add to the each metric + * @param int $delta The delta to add to the each metric * * @return mixed */ @@ -108,7 +108,7 @@ class NullStatsdDataFactory implements IBufferingStatsdDataFactory { /** * Check whether this data factory has any data. - * @return boolean + * @return bool */ public function hasData() { return false; diff --git a/includes/libs/stats/SamplingStatsdClient.php b/includes/libs/stats/SamplingStatsdClient.php index 4db2b6072c..1da9468d80 100644 --- a/includes/libs/stats/SamplingStatsdClient.php +++ b/includes/libs/stats/SamplingStatsdClient.php @@ -77,7 +77,7 @@ class SamplingStatsdClient extends StatsdClient { * strings are not allowed here as sampleData requires a StatsdDataInterface * @param int $sampleRate * - * @return integer the data sent in bytes + * @return int the data sent in bytes */ public function send( $data, $sampleRate = 1 ) { if ( !is_array( $data ) ) { diff --git a/includes/page/Article.php b/includes/page/Article.php index 7311f71dec..f52cd8d6e9 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1920,7 +1920,7 @@ class Article implements Page { /** * Check if the page can be cached - * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28) + * @param int $mode One of the HTMLFileCache::MODE_* constants (since 1.28) * @return bool */ public function isFileCacheable( $mode = HTMLFileCache::MODE_NORMAL ) { diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index e60f103f60..d5a2f3fba3 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1638,7 +1638,7 @@ class WikiPage implements Page, IDBAccessObject { /** * @param Content $content Pre-save transform content - * @param integer $flags + * @param int $flags * @param User $user * @param string $summary * @param array $meta @@ -1812,7 +1812,7 @@ class WikiPage implements Page, IDBAccessObject { /** * @param Content $content Pre-save transform content - * @param integer $flags + * @param int $flags * @param User $user * @param string $summary * @param array $meta @@ -2111,13 +2111,13 @@ class WikiPage implements Page, IDBAccessObject { * @param Revision $revision * @param User $user User object that did the revision * @param array $options Array of options, following indexes are used: - * - changed: boolean, whether the revision changed the content (default true) - * - created: boolean, whether the revision created the page (default false) - * - moved: boolean, whether the page was moved (default false) - * - restored: boolean, whether the page was undeleted (default false) + * - changed: bool, whether the revision changed the content (default true) + * - created: bool, whether the revision created the page (default false) + * - moved: bool, whether the page was moved (default false) + * - restored: bool, whether the page was undeleted (default false) * - oldrevision: Revision object for the pre-update revision (default null) - * - oldcountable: boolean, null, or string 'no-change' (default null): - * - boolean: whether the page was counted as an article before that + * - oldcountable: bool, null, or string 'no-change' (default null): + * - bool: whether the page was counted as an article before that * revision, only used in changed is true and created is false * - null: if created is false, don't update the article count; if created * is true, do update the article count @@ -2919,7 +2919,7 @@ class WikiPage implements Page, IDBAccessObject { /** * Lock the page row for this title+id and return page_latest (or 0) * - * @return integer Returns 0 if no row was found with this title+id + * @return int Returns 0 if no row was found with this title+id * @since 1.27 */ public function lockAndGetLatest() { @@ -3414,7 +3414,7 @@ class WikiPage implements Page, IDBAccessObject { * * @param array $added The names of categories that were added * @param array $deleted The names of categories that were deleted - * @param integer $id Page ID (this should be the original deleted page ID) + * @param int $id Page ID (this should be the original deleted page ID) */ public function updateCategoryCounts( array $added, array $deleted, $id = 0 ) { $id = $id ?: $this->getId(); diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index cfb0c3ec59..2dd4085e94 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -211,10 +211,10 @@ class ParserOutput extends CacheTime { */ private $mFlags = []; - /** @var integer|null Assumed rev ID for {{REVISIONID}} if no revision is set */ + /** @var int|null Assumed rev ID for {{REVISIONID}} if no revision is set */ private $mSpeculativeRevId; - /** @var integer Upper bound of expiry based on parse duration */ + /** @var int Upper bound of expiry based on parse duration */ private $mMaxAdaptiveExpiry = INF; const EDITSECTION_REGEX = @@ -291,7 +291,7 @@ class ParserOutput extends CacheTime { } /** - * @param integer $id + * @param int $id * @since 1.28 */ public function setSpeculativeRevIdUsed( $id ) { @@ -1075,7 +1075,7 @@ class ParserOutput extends CacheTime { /** * Lower the runtime adaptive TTL to at most this value * - * @param integer $ttl + * @param int $ttl * @since 1.28 */ public function updateRuntimeAdaptiveExpiry( $ttl ) { diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index 9ea8fa3a50..8e84cb2c82 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -1715,7 +1715,7 @@ class PPNode_Hash_Tree implements PPNode { * store array can be accessed via getNextSibling(). * * @param array $store - * @param integer $index + * @param int $index */ public function __construct( array $store, $index ) { $this->store = $store; @@ -1728,7 +1728,7 @@ class PPNode_Hash_Tree implements PPNode { * on what is at the relevant store index. * * @param array $store - * @param integer $index + * @param int $index * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text */ public static function factory( array $store, $index ) { @@ -1787,7 +1787,7 @@ class PPNode_Hash_Tree implements PPNode { * return a temporary proxy object: different instances will be returned * if this is called more than once on the same node. * - * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|boolean + * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool */ public function getFirstChild() { if ( !isset( $this->rawChildren[0] ) ) { @@ -1802,7 +1802,7 @@ class PPNode_Hash_Tree implements PPNode { * return a temporary proxy object: different instances will be returned * if this is called more than once on the same node. * - * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|boolean + * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool */ public function getNextSibling() { return self::factory( $this->store, $this->index + 1 ); @@ -2027,7 +2027,7 @@ class PPNode_Hash_Text implements PPNode { * store array can be accessed via getNextSibling(). * * @param array $store - * @param integer $index + * @param int $index */ public function __construct( array $store, $index ) { $this->value = $store[$index]; @@ -2156,7 +2156,7 @@ class PPNode_Hash_Attr implements PPNode { * store array can be accessed via getNextSibling(). * * @param array $store - * @param integer $index + * @param int $index */ public function __construct( array $store, $index ) { $descriptor = $store[$index]; diff --git a/includes/revisiondelete/RevDelItem.php b/includes/revisiondelete/RevDelItem.php index b114c7520c..bf97bd4100 100644 --- a/includes/revisiondelete/RevDelItem.php +++ b/includes/revisiondelete/RevDelItem.php @@ -37,7 +37,7 @@ abstract class RevDelItem extends RevisionItemBase { /** * Get the current deletion bitfield value * - * @return integer + * @return int */ abstract public function getBits(); diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index 4a807fbc7e..76fa590d03 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -234,7 +234,7 @@ class RevisionDeleter { * @since 1.22 * @param array $bitPars ExtractBitParams() params * @param int $oldfield Current bitfield - * @return integer + * @return int */ public static function extractBitfield( array $bitPars, $oldfield ) { // Build the actual new rev_deleted bitfield diff --git a/includes/services/ServiceContainer.php b/includes/services/ServiceContainer.php index 633cfc92db..9f09e22fc4 100644 --- a/includes/services/ServiceContainer.php +++ b/includes/services/ServiceContainer.php @@ -56,7 +56,7 @@ class ServiceContainer implements DestructibleService { private $serviceInstantiators = []; /** - * @var boolean[] disabled status, per service name + * @var bool[] disabled status, per service name */ private $disabled = []; @@ -66,7 +66,7 @@ class ServiceContainer implements DestructibleService { private $extraInstantiationParams; /** - * @var boolean + * @var bool */ private $destroyed = false; diff --git a/includes/session/CookieSessionProvider.php b/includes/session/CookieSessionProvider.php index 79fc720d1e..74925bd7b6 100644 --- a/includes/session/CookieSessionProvider.php +++ b/includes/session/CookieSessionProvider.php @@ -420,7 +420,7 @@ class CookieSessionProvider extends SessionProvider { * Cookies that are session-length do not call this function. * * @param string $cookieName - * @param boolean $shouldRememberUser Whether the user should be remembered + * @param bool $shouldRememberUser Whether the user should be remembered * long-term * @return int Cookie expiration time in seconds; 0 for session cookies */ diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index 8d77091dd4..a6d4a3e91c 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -32,12 +32,12 @@ class MediaStatisticsPage extends QueryPage { protected $totalCount = 0, $totalBytes = 0; /** - * @var integer $totalPerType Combined file size of all files in a section + * @var int $totalPerType Combined file size of all files in a section */ protected $totalPerType = 0; /** - * @var integer $totalSize Combined file size of all files + * @var int $totalSize Combined file size of all files */ protected $totalSize = 0; diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php index b29a3afbd4..947a572480 100644 --- a/includes/tidy/Balancer.php +++ b/includes/tidy/Balancer.php @@ -1528,7 +1528,7 @@ class BalanceActiveFormattingElements { /** * Determine whether an element is in the list of formatting elements. * @param BalanceElement $elt - * @return boolean + * @return bool */ public function isInList( BalanceElement $elt ) { return $this->head === $elt || $elt->prevAFE; diff --git a/includes/tidy/RemexCompatMunger.php b/includes/tidy/RemexCompatMunger.php index a797398d2e..73bc5f8493 100644 --- a/includes/tidy/RemexCompatMunger.php +++ b/includes/tidy/RemexCompatMunger.php @@ -129,7 +129,7 @@ class RemexCompatMunger implements TreeHandler { * Insert a p-wrapper * * @param SerializerNode $parent - * @param integer $sourceStart + * @param int $sourceStart * @return SerializerNode */ private function insertPWrapper( SerializerNode $parent, $sourceStart ) { @@ -220,12 +220,12 @@ class RemexCompatMunger implements TreeHandler { * FIXME: fostering ($preposition == BEFORE) is mostly done by inserting as * normal, the full algorithm is not followed. * - * @param integer $preposition + * @param int $preposition * @param Element|SerializerNode|null $refElement * @param Element $element * @param bool $void - * @param integer $sourceStart - * @param integer $sourceLength + * @param int $sourceStart + * @param int $sourceLength */ public function insertElement( $preposition, $refElement, Element $element, $void, $sourceStart, $sourceLength @@ -313,7 +313,7 @@ class RemexCompatMunger implements TreeHandler { * * @param SerializerNode $parentNode * @param bool $inline - * @param integer $pos The source position + * @param int $pos The source position * @return SerializerNode */ private function splitTagStack( SerializerNode $parentNode, $inline, $pos ) { diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 2ee40a886c..da3f9f82ac 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -247,7 +247,7 @@ abstract class UploadBase { /** * @param string $tempPath File system path to temporary file containing the upload - * @param integer $fileSize + * @param int $fileSize */ protected function setTempFile( $tempPath, $fileSize = null ) { $this->mTempPath = $tempPath; diff --git a/includes/user/User.php b/includes/user/User.php index 71a427298e..08f054d286 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -302,7 +302,7 @@ class User implements IDBAccessObject { /** @var Block */ private $mBlockedFromCreateAccount = false; - /** @var integer User::READ_* constant bitfield used to load data */ + /** @var int User::READ_* constant bitfield used to load data */ protected $queryFlagsUsed = self::READ_NORMAL; public static $idCacheByName = []; @@ -357,7 +357,7 @@ class User implements IDBAccessObject { /** * Load the user table data for this object from the source given by mFrom. * - * @param integer $flags User::READ_* constant bitfield + * @param int $flags User::READ_* constant bitfield */ public function load( $flags = self::READ_NORMAL ) { global $wgFullyInitialised; @@ -419,7 +419,7 @@ class User implements IDBAccessObject { /** * Load user table data, given mId has already been set. - * @param integer $flags User::READ_* constant bitfield + * @param int $flags User::READ_* constant bitfield * @return bool False if the ID does not exist, true otherwise */ public function loadFromId( $flags = self::READ_NORMAL ) { @@ -450,7 +450,7 @@ class User implements IDBAccessObject { /** * @since 1.27 * @param string $wikiId - * @param integer $userId + * @param int $userId */ public static function purge( $wikiId, $userId ) { $cache = ObjectCache::getMainWANInstance(); @@ -759,7 +759,7 @@ class User implements IDBAccessObject { /** * Get database id given a user name * @param string $name Username - * @param integer $flags User::READ_* constant bitfield + * @param int $flags User::READ_* constant bitfield * @return int|null The corresponding user's ID, or null if user is nonexistent */ public static function idFromName( $name, $flags = self::READ_NORMAL ) { @@ -1252,7 +1252,7 @@ class User implements IDBAccessObject { * Load user and user_group data from the database. * $this->mId must be set, this is how the user is identified. * - * @param integer $flags User::READ_* constant bitfield + * @param int $flags User::READ_* constant bitfield * @return bool True if the user exists, false if the user is anonymous */ public function loadFromDatabase( $flags = self::READ_LATEST ) { diff --git a/includes/utils/BatchRowIterator.php b/includes/utils/BatchRowIterator.php index cab6a3d6f8..60720c87e3 100644 --- a/includes/utils/BatchRowIterator.php +++ b/includes/utils/BatchRowIterator.php @@ -44,7 +44,7 @@ class BatchRowIterator implements RecursiveIterator { protected $primaryKey; /** - * @var integer $batchSize The number of rows to fetch per iteration + * @var int $batchSize The number of rows to fetch per iteration */ protected $batchSize; @@ -76,7 +76,7 @@ class BatchRowIterator implements RecursiveIterator { private $current = []; /** - * @var integer key 0-indexed number of pages fetched since self::reset() + * @var int key 0-indexed number of pages fetched since self::reset() */ private $key; @@ -89,7 +89,7 @@ class BatchRowIterator implements RecursiveIterator { * @param IDatabase $db The database to read from * @param string|array $table The name or names of the table to read from * @param string|array $primaryKey The name or names of the primary key columns - * @param integer $batchSize The number of rows to fetch per iteration + * @param int $batchSize The number of rows to fetch per iteration * @throws InvalidArgumentException */ public function __construct( IDatabase $db, $table, $primaryKey, $batchSize ) { @@ -167,7 +167,7 @@ class BatchRowIterator implements RecursiveIterator { } /** - * @return integer 0-indexed count of the page number fetched + * @return int 0-indexed count of the page number fetched */ public function key() { return $this->key; diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index dd9f2d9f61..736109b49a 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -542,7 +542,7 @@ class UIDGenerator { /** * @param array $time Result of UIDGenerator::millitime() - * @param integer $delta Number of intervals to add on to the timestamp + * @param int $delta Number of intervals to add on to the timestamp * @return string 60 bits of "100ns intervals since 15 October 1582" (rolls over in 3400) * @throws RuntimeException */ diff --git a/includes/widget/SearchInputWidget.php b/includes/widget/SearchInputWidget.php index 90792fc195..773c291dfc 100644 --- a/includes/widget/SearchInputWidget.php +++ b/includes/widget/SearchInputWidget.php @@ -22,7 +22,7 @@ class SearchInputWidget extends TitleInputWidget { * @param array $config Configuration options * @param int|null $config['pushPending'] Whether the input should be visually marked as * "pending", while requesting suggestions (default: false) - * @param boolean|null $config['performSearchOnClick'] If true, the script will start a search + * @param bool|null $config['performSearchOnClick'] If true, the script will start a search * whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the * text field only (default: true) * @param string $config['dataLocation'] Where the search input field will be diff --git a/includes/widget/SelectWithInputWidget.php b/includes/widget/SelectWithInputWidget.php index 8faae82251..d2dda75e54 100644 --- a/includes/widget/SelectWithInputWidget.php +++ b/includes/widget/SelectWithInputWidget.php @@ -24,7 +24,7 @@ class SelectWithInputWidget extends \OOUI\Widget { * @param array $config Configuration options * @param array $config['textinput'] Configuration for the TextInputWidget * @param array $config['dropdowninput'] Configuration for the DropdownInputWidget - * @param boolean $config['or'] Configuration for whether the widget is dropdown AND input + * @param bool $config['or'] Configuration for whether the widget is dropdown AND input * or dropdown OR input */ public function __construct( array $config = [] ) { diff --git a/languages/Language.php b/languages/Language.php index 9db7dec4cd..c514cdc595 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -4279,7 +4279,7 @@ class Language { * * @since 1.28 * @param Language $lang - * @return boolean + * @return bool */ public function equals( Language $lang ) { return $lang->getCode() === $this->mCode; @@ -4343,7 +4343,7 @@ class Language { /** * @param string $code - * @param boolean $fallback Whether we're going through language fallback chain + * @param bool $fallback Whether we're going through language fallback chain * @return string Name of the language class */ public static function classFromCode( $code, $fallback = true ) { diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 04565f2450..89e8089fbf 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1243,7 +1243,7 @@ abstract class Maintenance { * If not set, wfGetDB() will be used. * This function has the same parameters as wfGetDB() * - * @param integer $db DB index (DB_REPLICA/DB_MASTER) + * @param int $db DB index (DB_REPLICA/DB_MASTER) * @param array $groups; default: empty array * @param string|bool $wiki; default: current wiki * @return IMaintainableDatabase diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 4a2b49ae93..84d45335ec 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -459,10 +459,10 @@ class NamespaceConflictChecker extends Maintenance { /** * Get the preferred destination title for a given target page. - * @param integer $ns The destination namespace ID + * @param int $ns The destination namespace ID * @param string $name The conflicting prefix - * @param integer $sourceNs The source namespace - * @param integer $sourceDbk The source DB key (i.e. page_title) + * @param int $sourceNs The source namespace + * @param int $sourceDbk The source DB key (i.e. page_title) * @param array $options Associative array of validated command-line options * @return Title|false */ diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 5df432eb7a..b93d1127d6 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -32,9 +32,9 @@ use MediaWiki\MediaWikiServices; * @ingroup Maintenance */ class RebuildRecentchanges extends Maintenance { - /** @var integer UNIX timestamp */ + /** @var int UNIX timestamp */ private $cutoffFrom; - /** @var integer UNIX timestamp */ + /** @var int UNIX timestamp */ private $cutoffTo; public function __construct() { diff --git a/phpcs.xml b/phpcs.xml index cabea093b2..4c5266e419 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -9,10 +9,6 @@ - - - - diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 1d53344203..97c3c05b43 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -527,7 +527,7 @@ class ParserTestRunner { * Determine whether a particular setup function has been run * * @param string $funcName - * @return boolean + * @return bool */ public function isSetupDone( $funcName ) { return isset( $this->setupDone[$funcName] ) ? $this->setupDone[$funcName] : false; diff --git a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php index 58a6d38167..881ace272f 100644 --- a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php +++ b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php @@ -28,7 +28,7 @@ class WANObjectCacheTest extends PHPUnit_Framework_TestCase { * @covers WANObjectCache::get() * @covers WANObjectCache::makeKey() * @param mixed $value - * @param integer $ttl + * @param int $ttl */ public function testSetAndGet( $value, $ttl ) { $curTTL = null;