Use short type bool/int in param documentation
authorUmherirrender <umherirrender_de.wp@web.de>
Sun, 20 Aug 2017 11:20:59 +0000 (13:20 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 20 Aug 2017 11:20:59 +0000 (13:20 +0200)
Enable the phpcs sniffs for this and used phpcbf

Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925

79 files changed:
includes/Block.php
includes/Category.php
includes/EditPage.php
includes/MediaWiki.php
includes/MergeHistory.php
includes/OutputPage.php
includes/Revision.php
includes/SiteStats.php
includes/StreamFile.php
includes/api/ApiParamInfo.php
includes/auth/AuthManager.php
includes/auth/CreateFromLoginAuthenticationRequest.php
includes/cache/HTMLFileCache.php
includes/cache/MessageCache.php
includes/collation/IcuCollation.php
includes/config/EtcdConfig.php
includes/dao/DBAccessObjectUtils.php
includes/dao/IDBAccessObject.php
includes/deferred/DeferredUpdates.php
includes/deferred/LinksDeletionUpdate.php
includes/deferred/LinksUpdate.php
includes/exception/MWExceptionRenderer.php
includes/filerepo/FileBackendDBRepoWrapper.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/file/File.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/fields/HTMLFormFieldWithButton.php
includes/jobqueue/jobs/CategoryMembershipChangeJob.php
includes/jobqueue/jobs/RefreshLinksJob.php
includes/libs/GenericArrayObject.php
includes/libs/HashRing.php
includes/libs/MultiHttpClient.php
includes/libs/filebackend/HTTPFileStreamer.php
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/HashBagOStuff.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/RESTBagOStuff.php
includes/libs/objectcache/WANObjectCache.php
includes/libs/objectcache/WANObjectCacheReaper.php
includes/libs/rdbms/ChronologyProtector.php
includes/libs/rdbms/TransactionProfiler.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/position/MySQLMasterPos.php
includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php
includes/libs/rdbms/exception/DBQueryError.php
includes/libs/rdbms/lbfactory/ILBFactory.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/libs/rdbms/loadmonitor/ILoadMonitor.php
includes/libs/rdbms/loadmonitor/LoadMonitor.php
includes/libs/stats/BufferingStatsdDataFactory.php
includes/libs/stats/IBufferingStatsdDataFactory.php
includes/libs/stats/NullStatsdDataFactory.php
includes/libs/stats/SamplingStatsdClient.php
includes/page/Article.php
includes/page/WikiPage.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor_Hash.php
includes/revisiondelete/RevDelItem.php
includes/revisiondelete/RevisionDeleter.php
includes/services/ServiceContainer.php
includes/session/CookieSessionProvider.php
includes/specials/SpecialMediaStatistics.php
includes/tidy/Balancer.php
includes/tidy/RemexCompatMunger.php
includes/upload/UploadBase.php
includes/user/User.php
includes/utils/BatchRowIterator.php
includes/utils/UIDGenerator.php
includes/widget/SearchInputWidget.php
includes/widget/SelectWithInputWidget.php
languages/Language.php
maintenance/Maintenance.php
maintenance/namespaceDupes.php
maintenance/rebuildrecentchanges.php
phpcs.xml
tests/parser/ParserTestRunner.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php

index 843ea54..5066038 100644 (file)
@@ -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).
index c22ea64..629962d 100644 (file)
@@ -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.
         */
index 49341c5..914e7aa 100644 (file)
@@ -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.
index 4e47184..10b9e2b 100644 (file)
@@ -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
         */
index 48ff97b..9d63869 100644 (file)
@@ -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;
 
        /**
index 2a3a7cd..dd21194 100644 (file)
@@ -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 ) {
index 3d4d161..e457beb 100644 (file)
@@ -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;
index 6a2d0e2..ce87596 100644 (file)
@@ -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 ];
index cce3fc4..71113a8 100644 (file)
@@ -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
         */
index 17b0093..480575c 100644 (file)
@@ -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 ) {
index c3f798f..b2528fe 100644 (file)
@@ -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 ) {
index ddeb13d..db82797 100644 (file)
@@ -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 ) {
index b0a3a1c..7ae2ee0 100644 (file)
@@ -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 ) {
index 16c1ac5..768f980 100644 (file)
@@ -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 ) {
index d93362b..54b04ee 100644 (file)
@@ -36,7 +36,7 @@ class IcuCollation extends Collation {
        /** @var Language */
        protected $digitTransformLanguage;
 
-       /** @var boolean */
+       /** @var bool */
        private $useNumericCollation = false;
 
        /** @var array */
index 6605c38..d7dc45a 100644 (file)
@@ -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;
 
        /**
index cc63446..ee10368 100644 (file)
@@ -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
index 5acf3ae..e18a090 100644 (file)
  */
 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)
index e8f27ef..40069f3 100644 (file)
@@ -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
         */
index 3dd9de6..f579a1f 100644 (file)
@@ -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
         */
index c6facd9..18a87e8 100644 (file)
@@ -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
index 60d760f..bb5e4f4 100644 (file)
@@ -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() ) {
index c37a942..0d5a15d 100644 (file)
@@ -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 ) {
index 56ccc64..55a19e8 100644 (file)
@@ -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(
index 71e1c63..460fe51 100644 (file)
@@ -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 ) {
        }
index 7293b99..465736b 100644 (file)
@@ -1893,7 +1893,7 @@ class HTMLForm extends ContextSource {
         * 'novalidate' attribute will be added on the `<form>` 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() {
index 77ddc1a..3f1c590 100644 (file)
@@ -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() {
index bcb07bd..b2290ce 100644 (file)
@@ -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 */
index 3a0063c..3907fc6 100644 (file)
@@ -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;
index 0c84a13..b4ead5d 100644 (file)
@@ -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 ) {
index f76d9a2..79d1374 100644 (file)
@@ -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
index a4aabcd..be40965 100644 (file)
@@ -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
         */
index 6c48cee..16168e6 100644 (file)
@@ -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;
index a7d064b..9730acb 100644 (file)
@@ -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
         */
index a262e0e..f834ccf 100644 (file)
@@ -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 = [];
index baa3c32..6d583da 100644 (file)
@@ -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;
index 65f3a8a..200ab79 100644 (file)
@@ -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,...
index 5d2577b..d3aa9f5 100644 (file)
@@ -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 ) {
index a80ed8d..c1c9cc1 100644 (file)
@@ -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:<UNIX timestamp>:<holdoff>"
         *
         * @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
         */
index 1696c59..14737b1 100644 (file)
@@ -48,7 +48,7 @@ class WANObjectCacheReaper implements LoggerAwareInterface {
 
        /** @var string */
        protected $channel;
-       /** @var integer */
+       /** @var int */
        protected $initialStartWindow;
 
        /**
index 8b1aabe..f002d3e 100644 (file)
@@ -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;
 
        /**
index 8ac4161..af431a6 100644 (file)
@@ -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)";
index cec13b5..01020e9 100644 (file)
@@ -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
         */
index b82603e..9375efc 100644 (file)
@@ -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();
index 06776fe..0657cf3 100644 (file)
@@ -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 = '' ) {
index 4e28397..298ec61 100644 (file)
@@ -5,7 +5,7 @@ namespace Wikimedia\Rdbms;
 use stdClass;
 
 class MssqlResultWrapper extends ResultWrapper {
-       /** @var integer|null */
+       /** @var int|null */
        private $mSeekTo = null;
 
        /**
index bc2a865..6a4076f 100644 (file)
@@ -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;
index ff6635d..4cfa542 100644 (file)
@@ -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(
index 1665a5e..36de39e 100644 (file)
@@ -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 ) {
index fba5e13..a0877a4 100644 (file)
@@ -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)
         */
index d4e73c9..4db9e10 100644 (file)
@@ -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
         */
index 73c6a8f..d75d9c0 100644 (file)
@@ -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 );
index 64ee267..f77b26c 100644 (file)
@@ -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();
 
index 75d6b9e..7369751 100644 (file)
@@ -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;
index 4db2b60..1da9468 100644 (file)
@@ -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 ) ) {
index 7311f71..f52cd8d 100644 (file)
@@ -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 ) {
index e60f103..d5a2f3f 100644 (file)
@@ -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();
index cfb0c3e..2dd4085 100644 (file)
@@ -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 ) {
index 9ea8fa3..8e84cb2 100644 (file)
@@ -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];
index b114c75..bf97bd4 100644 (file)
@@ -37,7 +37,7 @@ abstract class RevDelItem extends RevisionItemBase {
        /**
         * Get the current deletion bitfield value
         *
-        * @return integer
+        * @return int
         */
        abstract public function getBits();
 
index 4a807fb..76fa590 100644 (file)
@@ -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
index 633cfc9..9f09e22 100644 (file)
@@ -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;
 
index 79fc720..74925bd 100644 (file)
@@ -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
         */
index 8d77091..a6d4a3e 100644 (file)
@@ -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;
 
index b29a3af..947a572 100644 (file)
@@ -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;
index a797398..73bc5f8 100644 (file)
@@ -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 ) {
index 2ee40a8..da3f9f8 100644 (file)
@@ -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;
index 71a4272..08f054d 100644 (file)
@@ -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 ) {
index cab6a3d..60720c8 100644 (file)
@@ -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;
index dd9f2d9..736109b 100644 (file)
@@ -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
         */
index 90792fc..773c291 100644 (file)
@@ -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
index 8faae82..d2dda75 100644 (file)
@@ -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 = [] ) {
index 9db7dec..c514cdc 100644 (file)
@@ -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 ) {
index 04565f2..89e8089 100644 (file)
@@ -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
index 4a2b49a..84d4533 100644 (file)
@@ -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
         */
index 5df432e..b93d112 100644 (file)
@@ -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() {
index cabea09..4c5266e 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,10 +9,6 @@
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
                <exclude name="MediaWiki.Commenting.FunctionComment.SpacingAfter" />
                <exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.NotShortBoolReturn" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.NotShortIntReturn" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.NotShortBoolParam" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.NotShortIntParam" />
                <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
                <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
index 1d53344..97c3c05 100644 (file)
@@ -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;
index 58a6d38..881ace2 100644 (file)
@@ -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;