From b45420410f9fcec1f658410e749ad9deef16848b Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 19 Apr 2014 22:22:20 +0200 Subject: [PATCH] Fixed some @params documentation (includes/*) Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Also added some missing @param. Change-Id: Iced714bca004756b461b66067a49a925a7e3b877 --- includes/debug/Debug.php | 52 +++++++++---------- includes/deferred/SearchUpdate.php | 2 +- includes/logging/LogEntry.php | 10 ++-- includes/logging/LogEventsList.php | 4 +- includes/logging/LogFormatter.php | 4 +- includes/logging/LogPager.php | 12 ++--- includes/poolcounter/PoolCounter.php | 8 +-- includes/poolcounter/PoolCounterRedis.php | 8 +-- includes/poolcounter/PoolCounterWork.php | 10 ++-- includes/profiler/Profiler.php | 40 +++++++------- includes/revisiondelete/RevisionDelete.php | 10 ++-- .../RevisionDeleteAbstracts.php | 2 +- .../revisiondelete/RevisionDeleteUser.php | 8 +-- includes/revisiondelete/RevisionDeleter.php | 20 +++---- includes/site/MediaWikiSite.php | 12 ++--- includes/site/Site.php | 8 +-- includes/site/SiteList.php | 22 ++++---- includes/site/SiteSQLStore.php | 13 ++--- includes/site/SiteStore.php | 8 +-- includes/title/MediaWikiTitleCodec.php | 6 +-- includes/title/TitleFormatter.php | 2 +- includes/title/TitleValue.php | 8 +-- 22 files changed, 136 insertions(+), 133 deletions(-) diff --git a/includes/debug/Debug.php b/includes/debug/Debug.php index 86f3dda02f..21170109f2 100644 --- a/includes/debug/Debug.php +++ b/includes/debug/Debug.php @@ -82,7 +82,7 @@ class MWDebug { * enabled. * * @since 1.19 - * @param $out OutputPage + * @param OutputPage $out */ public static function addModules( OutputPage $out ) { if ( self::$enabled ) { @@ -96,7 +96,7 @@ class MWDebug { * @todo Add support for passing objects * * @since 1.19 - * @param $str string + * @param string $str */ public static function log( $str ) { if ( !self::$enabled ) { @@ -132,12 +132,12 @@ class MWDebug { * Adds a warning entry to the log * * @since 1.19 - * @param $msg string - * @param $callerOffset int - * @param $level int A PHP error level. See sendMessage() - * @param $log string: 'production' will always trigger a php error, 'auto' - * will trigger an error if $wgDevelopmentWarnings is true, and 'debug' - * will only write to the debug log(s). + * @param string $msg + * @param int $callerOffset + * @param int $level A PHP error level. See sendMessage() + * @param string $log 'production' will always trigger a php error, 'auto' + * will trigger an error if $wgDevelopmentWarnings is true, and 'debug' + * will only write to the debug log(s). * * @return mixed */ @@ -178,8 +178,8 @@ class MWDebug { * @param string $function Function that is deprecated. * @param string|bool $version Version in which the function was deprecated. * @param string|bool $component Component to which the function belongs. - * If false, it is assumbed the function is in MediaWiki core. - * @param $callerOffset integer: How far up the callstack is the original + * If false, it is assumbed the function is in MediaWiki core. + * @param int $callerOffset How far up the callstack is the original * caller. 2 = function that called the function that called * MWDebug::deprecated() (Added in 1.20). * @return mixed @@ -253,9 +253,9 @@ class MWDebug { /** * Get an array describing the calling function at a specified offset. * - * @param $callerOffset integer: How far up the callstack is the original + * @param int $callerOffset How far up the callstack is the original * caller. 0 = function that called getCallerDescription() - * @return array with two keys: 'file' and 'func' + * @return array Array with two keys: 'file' and 'func' */ private static function getCallerDescription( $callerOffset ) { $callers = wfDebugBacktrace(); @@ -291,10 +291,10 @@ class MWDebug { * Send a message to the debug log and optionally also trigger a PHP * error, depending on the $level argument. * - * @param $msg string Message to send - * @param $caller array caller description get from getCallerDescription() - * @param $group string log group on which to send the message - * @param $level int|bool error level to use; set to false to not trigger an error + * @param string $msg Message to send + * @param array $caller Caller description get from getCallerDescription() + * @param string $group Log group on which to send the message + * @param int|bool $level Error level to use; set to false to not trigger an error */ private static function sendMessage( $msg, $caller, $group, $level ) { $msg .= ' [Called from ' . $caller['func'] . ' in ' . $caller['file'] . ']'; @@ -311,7 +311,7 @@ class MWDebug { * Do NOT use this method, use MWDebug::log or wfDebug() * * @since 1.19 - * @param $str string + * @param string $str */ public static function debugMsg( $str ) { global $wgDebugComments, $wgShowDebug; @@ -325,9 +325,9 @@ class MWDebug { * Begins profiling on a database query * * @since 1.19 - * @param $sql string - * @param $function string - * @param $isMaster bool + * @param string $sql + * @param string $function + * @param bool $isMaster * @return int ID number of the query to pass to queryTime or -1 if the * debugger is disabled */ @@ -351,7 +351,7 @@ class MWDebug { * Calculates how long a query took. * * @since 1.19 - * @param $id int + * @param int $id */ public static function queryTime( $id ) { if ( $id === -1 || !self::$enabled ) { @@ -365,7 +365,7 @@ class MWDebug { /** * Returns a list of files included, along with their size * - * @param $context IContextSource + * @param IContextSource $context * @return array */ protected static function getFilesIncluded( IContextSource $context ) { @@ -386,7 +386,7 @@ class MWDebug { * Returns the HTML to add to the page for the toolbar * * @since 1.19 - * @param $context IContextSource + * @param IContextSource $context * @return string */ public static function getDebugHTML( IContextSource $context ) { @@ -485,8 +485,8 @@ class MWDebug { /** * Append the debug info to given ApiResult * - * @param $context IContextSource - * @param $result ApiResult + * @param IContextSource $context + * @param ApiResult $result */ public static function appendDebugInfoToApiResult( IContextSource $context, ApiResult $result ) { if ( !self::$enabled ) { @@ -519,7 +519,7 @@ class MWDebug { /** * Returns the HTML to add to the page for the toolbar * - * @param $context IContextSource + * @param IContextSource $context * @return array */ public static function getDebugInfo( IContextSource $context ) { diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index 06df440166..6dc2e18dc0 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -179,7 +179,7 @@ class SearchUpdate implements DeferrableUpdate { * Get a string representation of a title suitable for * including in a search index * - * @return String a stripped-down title string ready for the search index + * @return string A stripped-down title string ready for the search index */ private function indexTitle() { global $wgContLang; diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 71b4fc24d7..c7f9e40c5d 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -88,8 +88,8 @@ interface LogEntry { public function getDeleted(); /** - * @param $field Integer: one of LogPage::DELETED_* bitfield constants - * @return Boolean + * @param int $field One of LogPage::DELETED_* bitfield constants + * @return bool */ public function isDeleted( $field ); } @@ -463,7 +463,7 @@ class ManualLogEntry extends LogEntryBase { * * @since 1.19 * - * @param integer $deleted + * @param int $deleted */ public function setDeleted( $deleted ) { $this->deleted = $deleted; @@ -569,8 +569,8 @@ class ManualLogEntry extends LogEntryBase { /** * Publishes the log entry. - * @param int $newId id of the log entry. - * @param string $to rcandudp (default), rc, udp + * @param int $newId Id of the log entry. + * @param string $to One of: rcandudp (default), rc, udp */ public function publish( $newId, $to = 'rcandudp' ) { $log = new LogPage( $this->getType() ); diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index cce902f72b..fda9a207c2 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -31,7 +31,7 @@ class LogEventsList extends ContextSource { public $flags; /** - * @var Array + * @var array */ protected $mDefaultQuery; @@ -276,7 +276,7 @@ class LogEventsList extends ContextSource { } /** - * @param $pattern + * @param string $pattern * @return string Checkbox */ private function getTitlePattern( $pattern ) { diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index ed3a8da19c..0139c4a838 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -64,7 +64,7 @@ class LogFormatter { /** * Handy shortcut for constructing a formatter directly from * database row. - * @param $row + * @param object $row * @see DatabaseLogEntry::getSelectQueryData * @return LogFormatter */ @@ -77,7 +77,7 @@ class LogFormatter { /** @var LogEntryBase */ protected $entry; - /** @var Integer Constant for handling log_deleted */ + /** @var int Constant for handling log_deleted */ protected $audience = self::FOR_PUBLIC; /** @var bool Whether to output user tool links */ diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index d33fc91254..399c7993ff 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -50,13 +50,13 @@ class LogPager extends ReverseChronologicalPager { * * @param LogEventsList $list * @param string|array $types Log types to show - * @param string $performer the user who made the log entries - * @param string|Title $title the page title the log entries are for - * @param string $pattern do a prefix search rather than an exact title match - * @param array $conds extra conditions for the query + * @param string $performer The user who made the log entries + * @param string|Title $title The page title the log entries are for + * @param string $pattern Do a prefix search rather than an exact title match + * @param array $conds Extra conditions for the query * @param int|bool $year The year to start from. Default: false * @param int|bool $month The month to start from. Default: false - * @param string $tagFilter tag + * @param string $tagFilter Tag */ public function __construct( $list, $types = array(), $performer = '', $title = '', $pattern = '', $conds = array(), $year = false, $month = false, $tagFilter = '' ) { @@ -289,7 +289,7 @@ class LogPager extends ReverseChronologicalPager { /** * Checks if $this->mConds has $field matched to a *single* value - * @param $field + * @param string $field * @return bool */ protected function hasEqualsClause( $field ) { diff --git a/includes/poolcounter/PoolCounter.php b/includes/poolcounter/PoolCounter.php index 1b209e4d04..a44200f7e8 100644 --- a/includes/poolcounter/PoolCounter.php +++ b/includes/poolcounter/PoolCounter.php @@ -53,9 +53,9 @@ abstract class PoolCounter { /** @var string All workers with the same key share the lock */ protected $key; - /** @var integer Maximum number of workers doing the task simultaneously */ + /** @var int Maximum number of workers doing the task simultaneously */ protected $workers; - /** @var integer If this number of workers are already working/waiting, fail instead of wait */ + /** @var int If this number of workers are already working/waiting, fail instead of wait */ protected $maxqueue; /** @var float Maximum time in seconds to wait for the lock */ protected $timeout; @@ -75,8 +75,8 @@ abstract class PoolCounter { /** * Create a Pool counter. This should only be called from the PoolWorks. * - * @param $type - * @param $key + * @param string $type + * @param string $key * * @return PoolCounter */ diff --git a/includes/poolcounter/PoolCounterRedis.php b/includes/poolcounter/PoolCounterRedis.php index 5c88239e43..36101e02cd 100644 --- a/includes/poolcounter/PoolCounterRedis.php +++ b/includes/poolcounter/PoolCounterRedis.php @@ -59,24 +59,24 @@ class PoolCounterRedis extends PoolCounter { protected $serversByLabel; /** @var string SHA-1 of the key */ protected $keySha1; - /** @var integer TTL for locks to expire (work should finish in this time) */ + /** @var int TTL for locks to expire (work should finish in this time) */ protected $lockTTL; /** @var RedisConnRef */ protected $conn; /** @var string Pool slot value */ protected $slot; - /** @var integer AWAKE_* constant */ + /** @var int AWAKE_* constant */ protected $onRelease; /** @var string Unique string to identify this process */ protected $session; - /** @var integer UNIX timestamp */ + /** @var int UNIX timestamp */ protected $slotTime; const AWAKE_ONE = 1; // wake-up if when a slot can be taken from an existing process const AWAKE_ALL = 2; // wake-up if an existing process finishes and wake up such others - /** @var Array List of active PoolCounterRedis objects in this script */ + /** @var array List of active PoolCounterRedis objects in this script */ protected static $active = null; function __construct( $conf, $type, $key ) { diff --git a/includes/poolcounter/PoolCounterWork.php b/includes/poolcounter/PoolCounterWork.php index 50ddd90a77..86bf8f12a9 100644 --- a/includes/poolcounter/PoolCounterWork.php +++ b/includes/poolcounter/PoolCounterWork.php @@ -37,13 +37,13 @@ abstract class PoolCounterWork { /** * Actually perform the work, caching it if needed - * @return mixed work result or false + * @return mixed Work result or false */ abstract public function doWork(); /** * Retrieve the work from cache - * @return mixed work result or false + * @return mixed Work result or false */ public function getCachedWork() { return false; @@ -52,7 +52,7 @@ abstract class PoolCounterWork { /** * A work not so good (eg. expired one) but better than an error * message. - * @return mixed work result or false + * @return mixed Work result or false */ public function fallback() { return false; @@ -69,7 +69,7 @@ abstract class PoolCounterWork { /** * Log an error * - * @param $status Status + * @param Status $status * @return void */ public function logError( $status ) { @@ -91,7 +91,7 @@ abstract class PoolCounterWork { * - c) fallback() : Applies for all remaining cases. * If these all fall through (by returning false), then the result of error() is returned. * - * @param $skipcache bool + * @param bool $skipcache * @return mixed */ public function execute( $skipcache = false ) { diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 02367e14de..109e3eb899 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -118,9 +118,9 @@ class Profiler { /** @var float seconds */ protected $mDBLockThreshold = 5.0; - /** @var Array DB/server name => (active trx count,timestamp) */ + /** @var array DB/server name => (active trx count,timestamp) */ protected $mDBTrxHoldingLocks = array(); - /** @var Array DB/server name => list of (function name, elapsed time) */ + /** @var array DB/server name => list of (function name, elapsed time) */ protected $mDBTrxMethodTimes = array(); /** @var Profiler */ @@ -167,7 +167,7 @@ class Profiler { /** * Set the profiler to a specific profiler instance. Mostly for dumpHTML - * @param $p Profiler object + * @param Profiler $p */ public static function setInstance( Profiler $p ) { self::$__instance = $p; @@ -176,7 +176,7 @@ class Profiler { /** * Return whether this a stub profiler * - * @return Boolean + * @return bool */ public function isStub() { return false; @@ -186,7 +186,7 @@ class Profiler { * Return whether this profiler stores data * * @see Profiler::logData() - * @return Boolean + * @return bool */ public function isPersistent() { return false; @@ -213,7 +213,7 @@ class Profiler { /** * Whether to internally just track aggregates and ignore the full stack trace * - * @return boolean + * @return bool */ protected function collateOnly() { return false; @@ -276,8 +276,8 @@ class Profiler { * @param string $name * @param float $elapsedCpu * @param float $elapsedReal - * @param integer $memChange - * @param integer $subcalls + * @param int $memChange + * @param int $subcalls * @param array|null $period Map of ('start','end','memory','subcalls') */ protected function updateEntry( @@ -308,7 +308,7 @@ class Profiler { /** * Called by wfProfieIn() * - * @param $functionname String + * @param string $functionname */ public function profileIn( $functionname ) { global $wgDebugFunctionEntry; @@ -330,7 +330,7 @@ class Profiler { /** * Called by wfProfieOut() * - * @param $functionname String + * @param string $functionname */ public function profileOut( $functionname ) { global $wgDebugFunctionEntry; @@ -477,7 +477,7 @@ class Profiler { /** * Mark this call as templated or not * - * @param $t Boolean + * @param bool $t */ public function setTemplated( $t ) { $this->mTemplated = $t; @@ -486,7 +486,7 @@ class Profiler { /** * Returns a profiling output to be stored in debug file * - * @return String + * @return string */ public function getOutput() { global $wgDebugFunctionEntry, $wgProfileCallTree; @@ -573,7 +573,7 @@ class Profiler { * Get the initial time of the request, based either on $wgRequestTime or * $wgRUstart. Will return null if not able to find data. * - * @param string|false $metric metric to use, with the following possibilities: + * @param string|false $metric Metric to use, with the following possibilities: * - user: User CPU time (without system calls) * - cpu: Total CPU time (user and system calls) * - wall (or any other string): elapsed time @@ -606,7 +606,7 @@ class Profiler { * Get the initial time of the request, based either on $wgRequestTime or * $wgRUstart. Will return null if not able to find data. * - * @param string|false $metric metric to use, with the following possibilities: + * @param string|false $metric Metric to use, with the following possibilities: * - user: User CPU time (without system calls) * - cpu: Total CPU time (user and system calls) * - wall (or any other string): elapsed time @@ -804,6 +804,8 @@ class Profiler { /** * Dummy calls to wfProfileIn/wfProfileOut to calculate its overhead + * + * @param int $profileCount */ protected static function calculateOverhead( $profileCount ) { wfProfileIn( '-overhead-total' ); @@ -818,9 +820,9 @@ class Profiler { * Counts the number of profiled function calls sitting under * the given point in the call graph. Not the most efficient algo. * - * @param $stack Array: - * @param $start Integer: - * @return Integer + * @param array $stack + * @param int $start + * @return int */ protected function calltreeCount( $stack, $start ) { $level = $stack[$start][1]; @@ -834,7 +836,7 @@ class Profiler { /** * Add an entry in the debug log file * - * @param string $s to output + * @param string $s String to output */ protected function debug( $s ) { if ( function_exists( 'wfDebug' ) ) { @@ -846,7 +848,7 @@ class Profiler { * Add an entry in the debug log group * * @param string $group Group to send the message to - * @param string $s to output + * @param string $s String to output */ protected function debugGroup( $group, $s ) { if ( function_exists( 'wfDebugLog' ) ) { diff --git a/includes/revisiondelete/RevisionDelete.php b/includes/revisiondelete/RevisionDelete.php index 7992882e94..0553880e98 100644 --- a/includes/revisiondelete/RevisionDelete.php +++ b/includes/revisiondelete/RevisionDelete.php @@ -55,7 +55,7 @@ class RevDel_RevisionList extends RevDel_List { } /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @return mixed */ public function doQuery( $db ) { @@ -318,7 +318,7 @@ class RevDel_ArchiveList extends RevDel_RevisionList { } /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @return mixed */ public function doQuery( $db ) { @@ -489,7 +489,7 @@ class RevDel_FileList extends RevDel_List { var $storeBatch, $deleteBatch, $cleanupBatch; /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @return mixed */ public function doQuery( $db ) { @@ -792,7 +792,7 @@ class RevDel_ArchivedFileList extends RevDel_FileList { } /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @return mixed */ public function doQuery( $db ) { @@ -916,7 +916,7 @@ class RevDel_LogList extends RevDel_List { } /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @return mixed */ public function doQuery( $db ) { diff --git a/includes/revisiondelete/RevisionDeleteAbstracts.php b/includes/revisiondelete/RevisionDeleteAbstracts.php index 3874602f7b..e326dcedf7 100644 --- a/includes/revisiondelete/RevisionDeleteAbstracts.php +++ b/includes/revisiondelete/RevisionDeleteAbstracts.php @@ -339,7 +339,7 @@ abstract class RevDel_Item extends RevisionItemBase { * If the update fails because it did not match, the function should return * false. This prevents concurrency problems. * - * @return boolean success + * @return bool Success */ abstract public function setBits( $newBits ); diff --git a/includes/revisiondelete/RevisionDeleteUser.php b/includes/revisiondelete/RevisionDeleteUser.php index b0b2253001..7b82b7b7b0 100644 --- a/includes/revisiondelete/RevisionDeleteUser.php +++ b/includes/revisiondelete/RevisionDeleteUser.php @@ -33,10 +33,10 @@ class RevisionDeleteUser { /** * Update *_deleted bitfields in various tables to hide or unhide usernames - * @param $name String username - * @param $userId Int user id - * @param $op String operator '|' or '&' - * @param $dbw null|DatabaseBase, if you happen to have one lying around + * @param string $name Username + * @param int $userId User id + * @param string $op Operator '|' or '&' + * @param null|DatabaseBase $dbw If you happen to have one lying around * @return bool */ private static function setUsernameBitfields( $name, $userId, $op, $dbw ) { diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index bea846048f..ecfe1d8721 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -93,10 +93,10 @@ class RevisionDeleter { * * @param string $desc description to add to the array if the option was * enabled / disabled. - * @param $field Integer: the bitmask describing the single option. - * @param $diff Integer: the xor of the old and new bitfields. - * @param $new Integer: the new bitfield - * @param array $arr the array to update. + * @param int $field The bitmask describing the single option. + * @param int $diff The xor of the old and new bitfields. + * @param int $new The new bitfield + * @param array $arr The array to update. */ protected static function checkItem( $desc, $field, $diff, $new, &$arr ) { if ( $diff & $field ) { @@ -117,8 +117,8 @@ class RevisionDeleter { * You can turn the keys in $arr[0] and $arr[1] into message keys by * appending -hid and and -unhid to the keys respectively. * - * @param $n Integer: the new bitfield. - * @param $o Integer: the old bitfield. + * @param int $n The new bitfield. + * @param int $o The old bitfield. * @return array An array as described above. * @since 1.19 public */ @@ -206,8 +206,8 @@ class RevisionDeleter { * If it doesn't, returns the corresponding ar_timestamp field * so that this key can be used instead. * - * @param $title Title - * @param $revid + * @param Title $title + * @param int $revid * @return bool|mixed */ public static function checkRevisionExistence( $title, $revid ) { @@ -230,8 +230,8 @@ class RevisionDeleter { /** * Put together a rev_deleted bitfield * @since 1.22 - * @param array $bitPars extractBitParams() params - * @param int $oldfield current bitfield + * @param array $bitPars ExtractBitParams() params + * @param int $oldfield Current bitfield * @return array */ public static function extractBitfield( $bitPars, $oldfield ) { diff --git a/includes/site/MediaWikiSite.php b/includes/site/MediaWikiSite.php index f3b8a0c7a6..248066b409 100644 --- a/includes/site/MediaWikiSite.php +++ b/includes/site/MediaWikiSite.php @@ -41,7 +41,7 @@ class MediaWikiSite extends Site { * @since 1.21 * @deprecated Just use the constructor or the factory Site::newForType * - * @param integer $globalId + * @param int $globalId * * @return MediaWikiSite */ @@ -67,9 +67,9 @@ class MediaWikiSite extends Site { * * @since 1.21 * - * @param string $title the target page's title, in normalized form. + * @param string $title The target page's title, in normalized form. * - * @return String + * @return string */ public function toDBKey( $title ) { return str_replace( ' ', '_', $title ); @@ -177,7 +177,7 @@ class MediaWikiSite extends Site { * @param array $externalData A reply from the API on a external server. * @param string $pageTitle Identifies the page at the external site, needing normalization. * - * @return array|boolean a 'page' structure representing the page identified by $pageTitle. + * @return array|bool A 'page' structure representing the page identified by $pageTitle. */ private static function extractPageRecord( $externalData, $pageTitle ) { // If there is a special case with only one returned page @@ -309,7 +309,7 @@ class MediaWikiSite extends Site { * * @since 1.21 * - * @param string|boolean $pageName Page name or false (default: false) + * @param string|bool $pageName Page name or false (default: false) * * @return string */ @@ -335,7 +335,7 @@ class MediaWikiSite extends Site { * * @since 1.21 * - * @param string|boolean $path + * @param string|bool $path * * @return string */ diff --git a/includes/site/Site.php b/includes/site/Site.php index 076dc88cc2..59230c71f5 100644 --- a/includes/site/Site.php +++ b/includes/site/Site.php @@ -234,7 +234,7 @@ class Site implements Serializable { * * @since 1.21 * - * @return boolean + * @return bool */ public function shouldForward() { return $this->forward; @@ -246,7 +246,7 @@ class Site implements Serializable { * * @since 1.21 * - * @param boolean $shouldForward + * @param bool $shouldForward * * @throws MWException */ @@ -365,9 +365,9 @@ class Site implements Serializable { * * @since 1.21 * - * @param bool|String $pageName + * @param bool|string $pageName * - * @return string|boolean false + * @return string|bool */ public function getPageUrl( $pageName = false ) { $url = $this->getLinkPath(); diff --git a/includes/site/SiteList.php b/includes/site/SiteList.php index a7c196b45b..69924500ca 100644 --- a/includes/site/SiteList.php +++ b/includes/site/SiteList.php @@ -33,7 +33,7 @@ class SiteList extends GenericArrayObject { * * @since 1.21 * - * @var array of integer + * @var array Array of integer */ protected $byInternalId = array(); @@ -42,7 +42,7 @@ class SiteList extends GenericArrayObject { * * @since 1.21 * - * @var array of string + * @var array Array of string */ protected $byGlobalId = array(); @@ -52,7 +52,7 @@ class SiteList extends GenericArrayObject { * * @since 1.23 * - * @var array of string + * @var array Array of string */ protected $byNavigationId = array(); @@ -75,7 +75,7 @@ class SiteList extends GenericArrayObject { * @param int|string $index * @param Site $site * - * @return boolean + * @return bool */ protected function preSetElement( $index, $site ) { if ( $this->hasSite( $site->getGlobalId() ) ) { @@ -136,7 +136,7 @@ class SiteList extends GenericArrayObject { * * @param string $globalSiteId * - * @return boolean + * @return bool */ public function hasSite( $globalSiteId ) { return array_key_exists( $globalSiteId, $this->byGlobalId ); @@ -173,7 +173,7 @@ class SiteList extends GenericArrayObject { * * @since 1.21 * - * @return boolean + * @return bool */ public function isEmpty() { return $this->byGlobalId === array(); @@ -182,9 +182,9 @@ class SiteList extends GenericArrayObject { /** * Returns if the list contains the site with the provided site id. * - * @param integer $id + * @param int $id * - * @return boolean + * @return bool */ public function hasInternalId( $id ) { return array_key_exists( $id, $this->byInternalId ); @@ -196,7 +196,7 @@ class SiteList extends GenericArrayObject { * * @since 1.21 * - * @param integer $id + * @param int $id * * @return Site */ @@ -210,7 +210,7 @@ class SiteList extends GenericArrayObject { * * @since 1.21 * - * @param integer $id + * @param int $id */ public function removeSiteByInternalId( $id ) { $this->offsetUnset( $this->byInternalId[$id] ); @@ -221,7 +221,7 @@ class SiteList extends GenericArrayObject { * * @param string $id * - * @return boolean + * @return bool */ public function hasNavigationId( $id ) { return array_key_exists( $id, $this->byNavigationId ); diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index 7bf933c120..d14569a1c3 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -90,7 +90,7 @@ class SiteSQLStore implements SiteStore { * * @see SiteList::getSerialVersionId * - * @return String The cache key. + * @return string The cache key. */ protected function getCacheKey() { wfProfileIn( __METHOD__ ); @@ -115,7 +115,7 @@ class SiteSQLStore implements SiteStore { * * @since 1.21 * - * @param string $source either 'cache' or 'recache' + * @param string $source Either 'cache' or 'recache' * * @return SiteList */ @@ -287,7 +287,7 @@ class SiteSQLStore implements SiteStore { * * @param Site $site * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSite( Site $site ) { return $this->saveSites( array( $site ) ); @@ -300,7 +300,7 @@ class SiteSQLStore implements SiteStore { * * @param Site[] $sites * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSites( array $sites ) { wfProfileIn( __METHOD__ ); @@ -390,7 +390,7 @@ class SiteSQLStore implements SiteStore { * * @see SiteStore::clear() * - * @return bool success + * @return bool Success */ public function clear() { wfProfileIn( __METHOD__ ); @@ -468,7 +468,7 @@ class Sites extends SiteSQLStore { * @since 1.21 * @deprecated * - * @param string|boolean false $globalId + * @param string|bool $globalId * * @return Site */ @@ -498,6 +498,7 @@ class Sites extends SiteSQLStore { /** * @deprecated + * @param string $group * @return SiteList */ public function getSiteGroup( $group ) { diff --git a/includes/site/SiteStore.php b/includes/site/SiteStore.php index 52ba8fbffe..537f1ccbbc 100644 --- a/includes/site/SiteStore.php +++ b/includes/site/SiteStore.php @@ -35,7 +35,7 @@ interface SiteStore { * * @param Site $site * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSite( Site $site ); @@ -46,7 +46,7 @@ interface SiteStore { * * @param Site[] $sites * - * @return boolean Success indicator + * @return bool Success indicator */ public function saveSites( array $sites ); @@ -56,7 +56,7 @@ interface SiteStore { * @since 1.21 * * @param string $globalId - * @param string $source either 'cache' or 'recache'. + * @param string $source Either 'cache' or 'recache'. * If 'cache', the values are allowed (but not obliged) to come from a cache. * * @return Site|null @@ -70,7 +70,7 @@ interface SiteStore { * * @since 1.21 * - * @param string $source either 'cache' or 'recache'. + * @param string $source Either 'cache' or 'recache'. * If 'cache', the values are allowed (but not obliged) to come from a cache. * * @return SiteList diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index 878f95d5e8..8d2fba0732 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -67,7 +67,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * @param string $text * * @throws InvalidArgumentException if the namespace is invalid - * @return String + * @return string */ public function getNamespaceName( $namespace, $text ) { if ( $this->language->needsGenderDistinction() && @@ -120,8 +120,8 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * Parses the given text and constructs a TitleValue. Normalization * is applied according to the rules appropriate for the form specified by $form. * - * @param string $text the text to parse - * @param int $defaultNamespace namespace to assume per default (usually NS_MAIN) + * @param string $text The text to parse + * @param int $defaultNamespace Namespace to assume per default (usually NS_MAIN) * * @throws MalformedTitleException * @return TitleValue diff --git a/includes/title/TitleFormatter.php b/includes/title/TitleFormatter.php index f3822b6b45..263f5479df 100644 --- a/includes/title/TitleFormatter.php +++ b/includes/title/TitleFormatter.php @@ -85,7 +85,7 @@ interface TitleFormatter { * @param string $text * * @throws InvalidArgumentException - * @return String + * @return string */ public function getNamespaceName( $namespace, $text ); } diff --git a/includes/title/TitleValue.php b/includes/title/TitleValue.php index 7a865eb552..d2b4d86682 100644 --- a/includes/title/TitleValue.php +++ b/includes/title/TitleValue.php @@ -59,10 +59,10 @@ class TitleValue { * un-normalized text when constructing TitleValues. For constructing a TitleValue from * user input or external sources, use a TitleParser. * - * @param $namespace int The namespace ID. This is not validated. - * @param $dbkey string The page title in valid DBkey form. No normalization is applied. - * @param $fragment string The fragment title. Use '' to represent the whole page. - * No validation or normalization is applied. + * @param int $namespace The namespace ID. This is not validated. + * @param string $dbkey The page title in valid DBkey form. No normalization is applied. + * @param string $fragment The fragment title. Use '' to represent the whole page. + * No validation or normalization is applied. * * @throws InvalidArgumentException */ -- 2.20.1