Merge "Fixed some @params documentation (includes/[Block.php|Revision.php])"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 23 Apr 2014 10:18:45 +0000 (10:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 23 Apr 2014 10:18:45 +0000 (10:18 +0000)
includes/Block.php
includes/Revision.php

index a3d3691..d9fa54d 100644 (file)
@@ -31,22 +31,22 @@ class Block {
                $mCreateAccount,
                $mParentBlockId;
 
-       /** @var User|String */
+       /** @var User|string */
        protected $target;
 
-       /** @var Integer Hack for foreign blocking (CentralAuth) */
+       /** @var int Hack for foreign blocking (CentralAuth) */
        protected $forcedTargetID;
 
-       /** @var Integer Block::TYPE_ constant. Can only be USER, IP or RANGE internally */
+       /** @var int Block::TYPE_ constant. Can only be USER, IP or RANGE internally */
        protected $type;
 
        /** @var User */
        protected $blocker;
 
-       /** @var Bool */
+       /** @var bool */
        protected $isHardblock = true;
 
-       /** @var Bool */
+       /** @var bool */
        protected $isAutoblocking = true;
 
        # TYPE constants
@@ -104,8 +104,8 @@ class Block {
        /**
         * Load a blocked user from their block id.
         *
-        * @param $id Integer: Block id to search for
-        * @return Block object or null
+        * @param int $id Block id to search for
+        * @return Block|null
         */
        public static function newFromID( $id ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -151,7 +151,7 @@ class Block {
         * Check if two blocks are effectively equal.  Doesn't check irrelevant things like
         * the blocking user or the block timestamp, only things which affect the blocked user
         *
-        * @param $block Block
+        * @param Block $block
         *
         * @return bool
         */
@@ -176,10 +176,10 @@ class Block {
         *     1) A block directly on the given user or IP
         *     2) A rangeblock encompassing the given IP (smallest first)
         *     3) An autoblock on the given IP
-        * @param $vagueTarget User|String also search for blocks affecting this target.  Doesn't
+        * @param User|string $vagueTarget Also search for blocks affecting this target.  Doesn't
         *     make any sense to use TYPE_AUTO / TYPE_ID here. Leave blank to skip IP lookups.
         * @throws MWException
-        * @return Bool whether a relevant block was found
+        * @return bool Whether a relevant block was found
         */
        protected function newLoad( $vagueTarget = null ) {
                $db = wfGetDB( $this->mFromMaster ? DB_MASTER : DB_SLAVE );
@@ -280,7 +280,7 @@ class Block {
         * Get a set of SQL conditions which will select rangeblocks encompassing a given range
         * @param string $start Hexadecimal IP representation
         * @param string $end Hexadecimal IP representation, or null to use $start = $end
-        * @return String
+        * @return string
         */
        public static function getRangeCond( $start, $end = null ) {
                if ( $end === null ) {
@@ -312,8 +312,8 @@ class Block {
        /**
         * Get the component of an IP address which is certain to be the same between an IP
         * address and a rangeblock containing that IP address.
-        * @param $hex String Hexadecimal IP representation
-        * @return String
+        * @param string $hex Hexadecimal IP representation
+        * @return string
         */
        protected static function getIpFragment( $hex ) {
                global $wgBlockCIDRLimit;
@@ -327,7 +327,7 @@ class Block {
        /**
         * Given a database row from the ipblocks table, initialize
         * member variables
-        * @param $row ResultWrapper: a row from the ipblocks table
+        * @param ResultWrapper $row A row from the ipblocks table
         */
        protected function initFromRow( $row ) {
                $this->setTarget( $row->ipb_address );
@@ -362,7 +362,7 @@ class Block {
 
        /**
         * Create a new Block object from a database row
-        * @param $row ResultWrapper row from the ipblocks table
+        * @param ResultWrapper $row Row from the ipblocks table
         * @return Block
         */
        public static function newFromRow( $row ) {
@@ -375,7 +375,7 @@ class Block {
         * Delete the row from the IP blocks table.
         *
         * @throws MWException
-        * @return Boolean
+        * @return bool
         */
        public function delete() {
                if ( wfReadOnly() ) {
@@ -397,8 +397,8 @@ class Block {
         * Insert a block into the block table. Will fail if there is a conflicting
         * block (same name and options) already in the database.
         *
-        * @param $dbw DatabaseBase if you have one available
-        * @return mixed: false on failure, assoc array on success:
+        * @param DatabaseBase $dbw If you have one available
+        * @return bool|array False on failure, assoc array on success:
         *      ('id' => block ID, 'autoIds' => array of autoblock IDs)
         */
        public function insert( $dbw = null ) {
@@ -482,8 +482,8 @@ class Block {
 
        /**
         * Get an array suitable for passing to $dbw->insert() or $dbw->update()
-        * @param $db DatabaseBase
-        * @return Array
+        * @param DatabaseBase $db
+        * @return array
         */
        protected function getDatabaseArray( $db = null ) {
                if ( !$db ) {
@@ -521,7 +521,7 @@ class Block {
        }
 
        /**
-        * @return Array
+        * @return array
         */
        protected function getAutoblockUpdateArray() {
                return array(
@@ -538,7 +538,7 @@ class Block {
         * Retroactively autoblocks the last IP used by the user (if it is a user)
         * blocked by this Block.
         *
-        * @return Array: block IDs of retroactive autoblocks made
+        * @return array Block IDs of retroactive autoblocks made
         */
        protected function doRetroactiveAutoblock() {
                $blockIds = array();
@@ -562,7 +562,7 @@ class Block {
         *
         * @param Block $block
         * @param array &$blockIds
-        * @return Array: block IDs of retroactive autoblocks made
+        * @return array Block IDs of retroactive autoblocks made
         */
        protected static function defaultRetroactiveAutoblock( Block $block, array &$blockIds ) {
                global $wgPutIPinRC;
@@ -603,7 +603,7 @@ class Block {
         * TODO: this probably belongs somewhere else, but not sure where...
         *
         * @param string $ip The IP to check
-        * @return Boolean
+        * @return bool
         */
        public static function isWhitelistedFromAutoblocks( $ip ) {
                global $wgMemc;
@@ -645,8 +645,8 @@ class Block {
        /**
         * Autoblocks the given IP, referring to this Block.
         *
-        * @param string $autoblockIP the IP to autoblock.
-        * @return mixed: block ID if an autoblock was inserted, false if not.
+        * @param string $autoblockIP The IP to autoblock.
+        * @return int|bool Block ID if an autoblock was inserted, false if not.
         */
        public function doAutoblock( $autoblockIP ) {
                # If autoblocks are disabled, go away.
@@ -716,7 +716,7 @@ class Block {
 
        /**
         * Check if a block has expired. Delete it if it is.
-        * @return Boolean
+        * @return bool
         */
        public function deleteIfExpired() {
                wfProfileIn( __METHOD__ );
@@ -736,7 +736,7 @@ class Block {
 
        /**
         * Has the block expired?
-        * @return Boolean
+        * @return bool
         */
        public function isExpired() {
                $timestamp = wfTimestampNow();
@@ -751,7 +751,7 @@ class Block {
 
        /**
         * Is the block address valid (i.e. not a null string?)
-        * @return Boolean
+        * @return bool
         */
        public function isValid() {
                return $this->getTarget() != null;
@@ -782,7 +782,7 @@ class Block {
        /**
         * Get the IP address at the start of the range in Hex form
         * @throws MWException
-        * @return String IP in Hex form
+        * @return string IP in Hex form
         */
        public function getRangeStart() {
                switch ( $this->type ) {
@@ -801,7 +801,7 @@ class Block {
        /**
         * Get the IP address at the end of the range in Hex form
         * @throws MWException
-        * @return String IP in Hex form
+        * @return string IP in Hex form
         */
        public function getRangeEnd() {
                switch ( $this->type ) {
@@ -820,7 +820,7 @@ class Block {
        /**
         * Get the user id of the blocking sysop
         *
-        * @return Integer (0 for foreign users)
+        * @return int (0 for foreign users)
         */
        public function getBy() {
                $blocker = $this->getBlocker();
@@ -832,7 +832,7 @@ class Block {
        /**
         * Get the username of the blocking sysop
         *
-        * @return String
+        * @return string
         */
        public function getByName() {
                $blocker = $this->getBlocker();
@@ -852,8 +852,8 @@ class Block {
        /**
         * Get/set a flag determining whether the master is used for reads
         *
-        * @param $x Bool
-        * @return Bool
+        * @param bool $x
+        * @return bool
         */
        public function fromMaster( $x = null ) {
                return wfSetVar( $this->mFromMaster, $x );
@@ -861,8 +861,8 @@ class Block {
 
        /**
         * Get/set whether the Block is a hardblock (affects logged-in users on a given IP/range
-        * @param $x Bool
-        * @return Bool
+        * @param bool $x
+        * @return bool
         */
        public function isHardblock( $x = null ) {
                wfSetVar( $this->isHardblock, $x );
@@ -885,9 +885,9 @@ class Block {
 
        /**
         * Get/set whether the Block prevents a given action
-        * @param $action String
-        * @param $x Bool
-        * @return Bool
+        * @param string $action
+        * @param bool $x
+        * @return bool
         */
        public function prevents( $action, $x = null ) {
                switch ( $action ) {
@@ -911,7 +911,7 @@ class Block {
 
        /**
         * Get the block name, but with autoblocked IPs hidden as per standard privacy policy
-        * @return String, text is escaped
+        * @return string Text is escaped
         */
        public function getRedactedName() {
                if ( $this->mAuto ) {
@@ -928,8 +928,8 @@ class Block {
        /**
         * Get a timestamp of the expiry for autoblocks
         *
-        * @param $timestamp String|Int
-        * @return String
+        * @param string|int $timestamp
+        * @return string
         */
        public static function getAutoblockExpiry( $timestamp ) {
                global $wgAutoblockExpiry;
@@ -955,7 +955,7 @@ class Block {
 
        /**
         * Given a target and the target's type, get an existing Block object if possible.
-        * @param $specificTarget String|User|Int a block target, which may be one of several types:
+        * @param string|User|int $specificTarget A block target, which may be one of several types:
         *     * A user to block, in which case $target will be a User
         *     * An IP to block, in which case $target will be a User generated by using
         *       User::newFromName( $ip, false ) to turn off name validation
@@ -965,10 +965,10 @@ class Block {
         *     Calling this with a user, IP address or range will not select autoblocks, and will
         *     only select a block where the targets match exactly (so looking for blocks on
         *     1.2.3.4 will not select 1.2.0.0/16 or even 1.2.3.4/32)
-        * @param $vagueTarget String|User|Int as above, but we will search for *any* block which
+        * @param string|User|int $vagueTarget As above, but we will search for *any* block which
         *     affects that target (so for an IP address, get ranges containing that IP; and also
         *     get any relevant autoblocks). Leave empty or blank to skip IP-based lookups.
-        * @param bool $fromMaster whether to use the DB_MASTER database
+        * @param bool $fromMaster Whether to use the DB_MASTER database
         * @return Block|null (null if no relevant block could be found).  The target and type
         *     of the returned Block will refer to the actual block which was found, which might
         *     not be the same as the target you gave if you used $vagueTarget!
@@ -1006,11 +1006,11 @@ class Block {
        /**
         * Get all blocks that match any IP from an array of IP addresses
         *
-        * @param Array $ipChain list of IPs (strings), usually retrieved from the
+        * @param array $ipChain List of IPs (strings), usually retrieved from the
         *         X-Forwarded-For header of the request
-        * @param Bool $isAnon Exclude anonymous-only blocks if false
-        * @param Bool $fromMaster Whether to query the master or slave database
-        * @return Array of Blocks
+        * @param bool $isAnon Exclude anonymous-only blocks if false
+        * @param bool $fromMaster Whether to query the master or slave database
+        * @return array Array of Blocks
         * @since 1.22
         */
        public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
@@ -1085,11 +1085,11 @@ class Block {
         *  - If there are multiple exact or range blocks at the same level, the one chosen
         *    is random
 
-        * @param Array $ipChain list of IPs (strings). This is used to determine how "close"
+        * @param array $ipChain List of IPs (strings). This is used to determine how "close"
         *        a block is to the server, and if a block matches exactly, or is in a range.
         *        The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
         *        local-squid, ...)
-        * @param Array $block Array of blocks
+        * @param array $block Array of blocks
         * @return Block|null the "best" block from the list
         */
        public static function chooseBlock( array $blocks, array $ipChain ) {
@@ -1194,7 +1194,7 @@ class Block {
         * as a string; for User objects this will return User::__toString()
         * which in turn gives User::getName().
         *
-        * @param $target String|Int|User|null
+        * @param string|int|User|null $target
         * @return array( User|String|null, Block::TYPE_ constant|null )
         */
        public static function parseTarget( $target ) {
@@ -1251,7 +1251,7 @@ class Block {
 
        /**
         * Get the type of target for this particular block
-        * @return Block::TYPE_ constant, will never be TYPE_ID
+        * @return int Block::TYPE_ constant, will never be TYPE_ID
         */
        public function getType() {
                return $this->mAuto
@@ -1274,7 +1274,7 @@ class Block {
         * Get the target for this particular Block.  Note that for autoblocks,
         * this returns the unredacted name; frontend functions need to call $block->getRedactedName()
         * in this situation.
-        * @return User|String
+        * @return User|string
         */
        public function getTarget() {
                return $this->target;
@@ -1283,7 +1283,7 @@ class Block {
        /**
         * @since 1.19
         *
-        * @return Mixed|string
+        * @return mixed|string
         */
        public function getExpiry() {
                return $this->mExpiry;
@@ -1291,7 +1291,7 @@ class Block {
 
        /**
         * Set the target for this block, and update $this->type accordingly
-        * @param $target Mixed
+        * @param mixed $target
         */
        public function setTarget( $target ) {
                list( $this->target, $this->type ) = self::parseTarget( $target );
@@ -1307,7 +1307,7 @@ class Block {
 
        /**
         * Set the user who implemented (or will implement) this block
-        * @param $user User|string Local User object or username string for foreign users
+        * @param User|string $user Local User object or username string for foreign users
         */
        public function setBlocker( $user ) {
                $this->blocker = $user;
index 797980f..7b30540 100644 (file)
@@ -86,9 +86,9 @@ class Revision implements IDBAccessObject {
         *      Revision::READ_LATEST  : Select the data from the master
         *      Revision::READ_LOCKING : Select & lock the data from the master
         *
-        * @param $id Integer
-        * @param $flags Integer (optional)
-        * @return Revision or null
+        * @param int $id
+        * @param int $flags (optional)
+        * @return Revision|null
         */
        public static function newFromId( $id, $flags = 0 ) {
                return self::newFromConds( array( 'rev_id' => intval( $id ) ), $flags );
@@ -103,10 +103,10 @@ class Revision implements IDBAccessObject {
         *      Revision::READ_LATEST  : Select the data from the master
         *      Revision::READ_LOCKING : Select & lock the data from the master
         *
-        * @param $title Title
-        * @param $id Integer (optional)
-        * @param $flags Integer Bitfield (optional)
-        * @return Revision or null
+        * @param Title $title
+        * @param int $id (optional)
+        * @param int $flags Bitfield (optional)
+        * @return Revision|null
         */
        public static function newFromTitle( $title, $id = 0, $flags = 0 ) {
                $conds = array(
@@ -134,10 +134,10 @@ class Revision implements IDBAccessObject {
         *      Revision::READ_LATEST  : Select the data from the master (since 1.20)
         *      Revision::READ_LOCKING : Select & lock the data from the master
         *
-        * @param $revId Integer
-        * @param $pageId Integer (optional)
-        * @param $flags Integer Bitfield (optional)
-        * @return Revision or null
+        * @param int $revId
+        * @param int $pageId (optional)
+        * @param int $flags Bitfield (optional)
+        * @return Revision|null
         */
        public static function newFromPageId( $pageId, $revId = 0, $flags = 0 ) {
                $conds = array( 'page_id' => $pageId );
@@ -155,8 +155,8 @@ class Revision implements IDBAccessObject {
         * for permissions or even inserted (as in Special:Undelete)
         * @todo FIXME: Should be a subclass for RevisionDelete. [TS]
         *
-        * @param $row
-        * @param $overrides array
+        * @param object $row
+        * @param array $overrides
         *
         * @throws MWException
         * @return Revision
@@ -205,7 +205,7 @@ class Revision implements IDBAccessObject {
        /**
         * @since 1.19
         *
-        * @param $row
+        * @param object $row
         * @return Revision
         */
        public static function newFromRow( $row ) {
@@ -216,9 +216,9 @@ class Revision implements IDBAccessObject {
         * Load a page revision from a given revision ID number.
         * Returns null if no such revision can be found.
         *
-        * @param $db DatabaseBase
-        * @param $id Integer
-        * @return Revision or null
+        * @param DatabaseBase $db
+        * @param int $id
+        * @return Revision|null
         */
        public static function loadFromId( $db, $id ) {
                return self::loadFromConds( $db, array( 'rev_id' => intval( $id ) ) );
@@ -229,10 +229,10 @@ class Revision implements IDBAccessObject {
         * that's attached to a given page. If not attached
         * to that page, will return null.
         *
-        * @param $db DatabaseBase
-        * @param $pageid Integer
-        * @param $id Integer
-        * @return Revision or null
+        * @param DatabaseBase $db
+        * @param int $pageid
+        * @param int $id
+        * @return Revision|null
         */
        public static function loadFromPageId( $db, $pageid, $id = 0 ) {
                $conds = array( 'rev_page' => intval( $pageid ), 'page_id' => intval( $pageid ) );
@@ -249,10 +249,10 @@ class Revision implements IDBAccessObject {
         * that's attached to a given page. If not attached
         * to that page, will return null.
         *
-        * @param $db DatabaseBase
-        * @param $title Title
-        * @param $id Integer
-        * @return Revision or null
+        * @param DatabaseBase $db
+        * @param Title $title
+        * @param int $id
+        * @return Revision|null
         */
        public static function loadFromTitle( $db, $title, $id = 0 ) {
                if ( $id ) {
@@ -274,10 +274,10 @@ class Revision implements IDBAccessObject {
         * WARNING: Timestamps may in some circumstances not be unique,
         * so this isn't the best key to use.
         *
-        * @param $db DatabaseBase
-        * @param $title Title
-        * @param $timestamp String
-        * @return Revision or null
+        * @param DatabaseBase $db
+        * @param Title $title
+        * @param string $timestamp
+        * @return Revision|null
         */
        public static function loadFromTimestamp( $db, $title, $timestamp ) {
                return self::loadFromConds( $db,
@@ -292,9 +292,9 @@ class Revision implements IDBAccessObject {
        /**
         * Given a set of conditions, fetch a revision.
         *
-        * @param $conditions Array
-        * @param $flags integer (optional)
-        * @return Revision or null
+        * @param array $conditions
+        * @param int $flags (optional)
+        * @return Revision|null
         */
        private static function newFromConds( $conditions, $flags = 0 ) {
                $db = wfGetDB( ( $flags & self::READ_LATEST ) ? DB_MASTER : DB_SLAVE );
@@ -315,10 +315,10 @@ class Revision implements IDBAccessObject {
         * Given a set of conditions, fetch a revision from
         * the given database connection.
         *
-        * @param $db DatabaseBase
-        * @param $conditions Array
-        * @param $flags integer (optional)
-        * @return Revision or null
+        * @param DatabaseBase $db
+        * @param array $conditions
+        * @param int $flags (optional)
+        * @return Revision|null
         */
        private static function loadFromConds( $db, $conditions, $flags = 0 ) {
                $res = self::fetchFromConds( $db, $conditions, $flags );
@@ -338,7 +338,7 @@ class Revision implements IDBAccessObject {
         * fetch all of a given page's revisions in turn.
         * Each row can be fed to the constructor to get objects.
         *
-        * @param $title Title
+        * @param Title $title
         * @return ResultWrapper
         */
        public static function fetchRevision( $title ) {
@@ -357,9 +357,9 @@ class Revision implements IDBAccessObject {
         * which will return matching database rows with the
         * fields necessary to build Revision objects.
         *
-        * @param $db DatabaseBase
-        * @param $conditions Array
-        * @param $flags integer (optional)
+        * @param DatabaseBase $db
+        * @param array $conditions
+        * @param int $flags (optional)
         * @return ResultWrapper
         */
        private static function fetchFromConds( $db, $conditions, $flags = 0 ) {
@@ -386,7 +386,7 @@ class Revision implements IDBAccessObject {
         * Return the value of a select() JOIN conds array for the user table.
         * This will get user table rows for logged-in users.
         * @since 1.19
-        * @return Array
+        * @return array
         */
        public static function userJoinCond() {
                return array( 'LEFT JOIN', array( 'rev_user != 0', 'user_id = rev_user' ) );
@@ -396,7 +396,7 @@ class Revision implements IDBAccessObject {
         * Return the value of a select() page conds array for the page table.
         * This will assure that the revision(s) are not orphaned from live pages.
         * @since 1.19
-        * @return Array
+        * @return array
         */
        public static function pageJoinCond() {
                return array( 'INNER JOIN', array( 'page_id = rev_page' ) );
@@ -500,8 +500,8 @@ class Revision implements IDBAccessObject {
 
        /**
         * Do a batched query to get the parent revision lengths
-        * @param $db DatabaseBase
-        * @param $revIds Array
+        * @param DatabaseBase $db
+        * @param array $revIds
         * @return array
         */
        public static function getParentLengths( $db, array $revIds ) {
@@ -524,7 +524,7 @@ class Revision implements IDBAccessObject {
        /**
         * Constructor
         *
-        * @param $row Mixed: either a database row or an array
+        * @param object $row Either a database row or an array
         * @throws MWException
         * @access private
         */
@@ -698,7 +698,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get revision ID
         *
-        * @return Integer|null
+        * @return int|null
         */
        public function getId() {
                return $this->mId;
@@ -708,7 +708,7 @@ class Revision implements IDBAccessObject {
         * Set the revision ID
         *
         * @since 1.19
-        * @param $id Integer
+        * @param int $id
         */
        public function setId( $id ) {
                $this->mId = $id;
@@ -717,7 +717,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get text row ID
         *
-        * @return Integer|null
+        * @return int|null
         */
        public function getTextId() {
                return $this->mTextId;
@@ -726,7 +726,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get parent revision ID (the original previous page revision)
         *
-        * @return Integer|null
+        * @return int|null
         */
        public function getParentId() {
                return $this->mParentId;
@@ -735,7 +735,7 @@ class Revision implements IDBAccessObject {
        /**
         * Returns the length of the text in this revision, or null if unknown.
         *
-        * @return Integer|null
+        * @return int|null
         */
        public function getSize() {
                return $this->mSize;
@@ -744,7 +744,7 @@ class Revision implements IDBAccessObject {
        /**
         * Returns the base36 sha1 of the text in this revision, or null if unknown.
         *
-        * @return String|null
+        * @return string|null
         */
        public function getSha1() {
                return $this->mSha1;
@@ -785,7 +785,7 @@ class Revision implements IDBAccessObject {
        /**
         * Set the title of the revision
         *
-        * @param $title Title
+        * @param Title $title
         */
        public function setTitle( $title ) {
                $this->mTitle = $title;
@@ -794,7 +794,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get the page ID
         *
-        * @return Integer|null
+        * @return int|null
         */
        public function getPage() {
                return $this->mPage;
@@ -805,13 +805,13 @@ class Revision implements IDBAccessObject {
         * If the specified audience does not have access to it, zero will be
         * returned.
         *
-        * @param $audience Integer: one of:
-        *      Revision::FOR_PUBLIC       to be displayed to all users
-        *      Revision::FOR_THIS_USER    to be displayed to the given user
-        *      Revision::RAW              get the ID regardless of permissions
-        * @param $user User object to check for, only if FOR_THIS_USER is passed
-        *              to the $audience parameter
-        * @return Integer
+        * @param int $audience One of:
+        *   Revision::FOR_PUBLIC       to be displayed to all users
+        *   Revision::FOR_THIS_USER    to be displayed to the given user
+        *   Revision::RAW              get the ID regardless of permissions
+        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        *   to the $audience parameter
+        * @return int
         */
        public function getUser( $audience = self::FOR_PUBLIC, User $user = null ) {
                if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
@@ -826,7 +826,7 @@ class Revision implements IDBAccessObject {
        /**
         * Fetch revision's user id without regard for the current user's permissions
         *
-        * @return String
+        * @return string
         */
        public function getRawUser() {
                return $this->mUser;
@@ -837,12 +837,12 @@ class Revision implements IDBAccessObject {
         * If the specified audience does not have access to the username, an
         * empty string will be returned.
         *
-        * @param $audience Integer: one of:
-        *      Revision::FOR_PUBLIC       to be displayed to all users
-        *      Revision::FOR_THIS_USER    to be displayed to the given user
-        *      Revision::RAW              get the text regardless of permissions
-        * @param $user User object to check for, only if FOR_THIS_USER is passed
-        *              to the $audience parameter
+        * @param int $audience One of:
+        *   Revision::FOR_PUBLIC       to be displayed to all users
+        *   Revision::FOR_THIS_USER    to be displayed to the given user
+        *   Revision::RAW              get the text regardless of permissions
+        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        *   to the $audience parameter
         * @return string
         */
        public function getUserText( $audience = self::FOR_PUBLIC, User $user = null ) {
@@ -858,7 +858,7 @@ class Revision implements IDBAccessObject {
        /**
         * Fetch revision's username without regard for view restrictions
         *
-        * @return String
+        * @return string
         */
        public function getRawUserText() {
                if ( $this->mUserText === null ) {
@@ -877,13 +877,13 @@ class Revision implements IDBAccessObject {
         * If the specified audience does not have access to the comment, an
         * empty string will be returned.
         *
-        * @param $audience Integer: one of:
-        *      Revision::FOR_PUBLIC       to be displayed to all users
-        *      Revision::FOR_THIS_USER    to be displayed to the given user
-        *      Revision::RAW              get the text regardless of permissions
-        * @param $user User object to check for, only if FOR_THIS_USER is passed
-        *              to the $audience parameter
-        * @return String
+        * @param int $audience One of:
+        *   Revision::FOR_PUBLIC       to be displayed to all users
+        *   Revision::FOR_THIS_USER    to be displayed to the given user
+        *   Revision::RAW              get the text regardless of permissions
+        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        *   to the $audience parameter
+        * @return string
         */
        function getComment( $audience = self::FOR_PUBLIC, User $user = null ) {
                if ( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_COMMENT ) ) {
@@ -898,21 +898,21 @@ class Revision implements IDBAccessObject {
        /**
         * Fetch revision comment without regard for the current user's permissions
         *
-        * @return String
+        * @return string
         */
        public function getRawComment() {
                return $this->mComment;
        }
 
        /**
-        * @return Boolean
+        * @return bool
         */
        public function isMinor() {
                return (bool)$this->mMinorEdit;
        }
 
        /**
-        * @return integer rcid of the unpatrolled row, zero if there isn't one
+        * @return int Rcid of the unpatrolled row, zero if there isn't one
         */
        public function isUnpatrolled() {
                if ( $this->mUnpatrolled !== null ) {
@@ -948,7 +948,7 @@ class Revision implements IDBAccessObject {
        /**
         * @param int $field one of DELETED_* bitfield constants
         *
-        * @return Boolean
+        * @return bool
         */
        public function isDeleted( $field ) {
                return ( $this->mDeleted & $field ) == $field;
@@ -968,16 +968,16 @@ class Revision implements IDBAccessObject {
         * If the specified audience does not have the ability to view this
         * revision, an empty string will be returned.
         *
-        * @param $audience Integer: one of:
-        *      Revision::FOR_PUBLIC       to be displayed to all users
-        *      Revision::FOR_THIS_USER    to be displayed to the given user
-        *      Revision::RAW              get the text regardless of permissions
-        * @param $user User object to check for, only if FOR_THIS_USER is passed
-        *              to the $audience parameter
+        * @param int $audience One of:
+        *   Revision::FOR_PUBLIC       to be displayed to all users
+        *   Revision::FOR_THIS_USER    to be displayed to the given user
+        *   Revision::RAW              get the text regardless of permissions
+        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        *   to the $audience parameter
         *
         * @deprecated since 1.21, use getContent() instead
         * @todo Replace usage in core
-        * @return String
+        * @return string
         */
        public function getText( $audience = self::FOR_PUBLIC, User $user = null ) {
                ContentHandler::deprecated( __METHOD__, '1.21' );
@@ -991,12 +991,12 @@ class Revision implements IDBAccessObject {
         * If the specified audience does not have the ability to view this
         * revision, null will be returned.
         *
-        * @param $audience Integer: one of:
-        *      Revision::FOR_PUBLIC       to be displayed to all users
-        *      Revision::FOR_THIS_USER    to be displayed to $wgUser
-        *      Revision::RAW              get the text regardless of permissions
-        * @param $user User object to check for, only if FOR_THIS_USER is passed
-        *              to the $audience parameter
+        * @param int $audience One of:
+        *   Revision::FOR_PUBLIC       to be displayed to all users
+        *   Revision::FOR_THIS_USER    to be displayed to $wgUser
+        *   Revision::RAW              get the text regardless of permissions
+        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        *   to the $audience parameter
         * @since 1.21
         * @return Content|null
         */
@@ -1013,7 +1013,7 @@ class Revision implements IDBAccessObject {
        /**
         * Fetch revision text without regard for view restrictions
         *
-        * @return String
+        * @return string
         *
         * @deprecated since 1.21. Instead, use Revision::getContent( Revision::RAW )
         *                         or Revision::getSerializedData() as appropriate.
@@ -1027,7 +1027,7 @@ class Revision implements IDBAccessObject {
         * Fetch original serialized data without regard for view restrictions
         *
         * @since 1.21
-        * @return String
+        * @return string
         */
        public function getSerializedData() {
                if ( is_null( $this->mText ) ) {
@@ -1044,7 +1044,7 @@ class Revision implements IDBAccessObject {
         * fresh clone.
         *
         * @since 1.21
-        * @return Content|null the Revision's content, or null on failure.
+        * @return Content|null The Revision's content, or null on failure.
         */
        protected function getContentInternal() {
                if ( is_null( $this->mContent ) ) {
@@ -1075,7 +1075,7 @@ class Revision implements IDBAccessObject {
         * used to determine the content model to use. If no title is know, CONTENT_MODEL_WIKITEXT
         * is used as a last resort.
         *
-        * @return String the content model id associated with this revision,
+        * @return string The content model id associated with this revision,
         *     see the CONTENT_MODEL_XXX constants.
         **/
        public function getContentModel() {
@@ -1095,7 +1095,7 @@ class Revision implements IDBAccessObject {
         * If no content format was stored in the database, the default format for this
         * revision's content model is returned.
         *
-        * @return String the content format id associated with this revision,
+        * @return string The content format id associated with this revision,
         *     see the CONTENT_FORMAT_XXX constants.
         **/
        public function getContentFormat() {
@@ -1132,14 +1132,14 @@ class Revision implements IDBAccessObject {
        }
 
        /**
-        * @return String
+        * @return string
         */
        public function getTimestamp() {
                return wfTimestamp( TS_MW, $this->mTimestamp );
        }
 
        /**
-        * @return Boolean
+        * @return bool
         */
        public function isCurrent() {
                return $this->mCurrent;
@@ -1163,7 +1163,7 @@ class Revision implements IDBAccessObject {
        /**
         * Get next revision for this title
         *
-        * @return Revision or null
+        * @return Revision|null
         */
        public function getNext() {
                if ( $this->getTitle() ) {
@@ -1179,8 +1179,8 @@ class Revision implements IDBAccessObject {
         * Get previous revision Id for this page_id
         * This is used to populate rev_parent_id on save
         *
-        * @param $db DatabaseBase
-        * @return Integer
+        * @param DatabaseBase $db
+        * @return int
         */
        private function getPreviousRevisionId( $db ) {
                if ( is_null( $this->mPage ) ) {
@@ -1259,8 +1259,8 @@ class Revision implements IDBAccessObject {
         * data is compressed, and 'utf-8' if we're saving in UTF-8
         * mode.
         *
-        * @param $text Mixed: reference to a text
-        * @return String
+        * @param mixed $text Reference to a text
+        * @return string
         */
        public static function compressRevisionText( &$text ) {
                global $wgCompressRevisions;
@@ -1284,9 +1284,9 @@ class Revision implements IDBAccessObject {
        /**
         * Re-converts revision text according to it's flags.
         *
-        * @param $text Mixed: reference to a text
-        * @param $flags array: compression flags
-        * @return String|bool decompressed text, or false on failure
+        * @param mixed $text Reference to a text
+        * @param array $flags Compression flags
+        * @return string|bool Decompressed text, or false on failure
         */
        public static function decompressRevisionText( $text, $flags ) {
                if ( in_array( 'gzip', $flags ) ) {
@@ -1325,9 +1325,9 @@ class Revision implements IDBAccessObject {
         * Insert a new revision into the database, returning the new revision ID
         * number on success and dies horribly on failure.
         *
-        * @param $dbw DatabaseBase: (master connection)
+        * @param DatabaseBase $dbw (master connection)
         * @throws MWException
-        * @return Integer
+        * @return int
         */
        public function insertOn( $dbw ) {
                global $wgDefaultExternalStore, $wgContentHandlerUseDB;
@@ -1477,8 +1477,8 @@ class Revision implements IDBAccessObject {
 
        /**
         * Get the base 36 SHA-1 value for a string of text
-        * @param $text String
-        * @return String
+        * @param string $text
+        * @return string
         */
        public static function base36Sha1( $text ) {
                return wfBaseConvert( sha1( $text ), 16, 36, 31 );
@@ -1488,7 +1488,7 @@ class Revision implements IDBAccessObject {
         * Lazy-load the revision's text.
         * Currently hardcoded to the 'text' table storage engine.
         *
-        * @return String|bool the revision's text, or false on failure
+        * @return string|bool The revision's text, or false on failure
         */
        protected function loadText() {
                wfProfileIn( __METHOD__ );
@@ -1562,11 +1562,11 @@ class Revision implements IDBAccessObject {
         * Such revisions can for instance identify page rename
         * operations and other such meta-modifications.
         *
-        * @param $dbw DatabaseBase
-        * @param $pageId Integer: ID number of the page to read from
-        * @param string $summary revision's summary
-        * @param $minor Boolean: whether the revision should be considered as minor
-        * @return Revision|null on error
+        * @param DatabaseBase $dbw
+        * @param int $pageId: ID number of the page to read from
+        * @param string $summary Revision's summary
+        * @param bool $minor Whether the revision should be considered as minor
+        * @return Revision|null Revision or null on error
         */
        public static function newNullRevision( $dbw, $pageId, $summary, $minor ) {
                global $wgContentHandlerUseDB;
@@ -1620,11 +1620,11 @@ class Revision implements IDBAccessObject {
         * Determine if the current user is allowed to view a particular
         * field of this revision, if it's marked as deleted.
         *
-        * @param $field Integer:one of self::DELETED_TEXT,
+        * @param int $field One of self::DELETED_TEXT,
         *                              self::DELETED_COMMENT,
         *                              self::DELETED_USER
-        * @param $user User object to check, or null to use $wgUser
-        * @return Boolean
+        * @param User|null $user User object to check, or null to use $wgUser
+        * @return bool
         */
        public function userCan( $field, User $user = null ) {
                return self::userCanBitfield( $this->mDeleted, $field, $user );
@@ -1635,12 +1635,12 @@ class Revision implements IDBAccessObject {
         * field of this revision, if it's marked as deleted. This is used
         * by various classes to avoid duplication.
         *
-        * @param $bitfield Integer: current field
-        * @param $field Integer: one of self::DELETED_TEXT = File::DELETED_FILE,
+        * @param int $bitfield Current field
+        * @param int $field One of self::DELETED_TEXT = File::DELETED_FILE,
         *                               self::DELETED_COMMENT = File::DELETED_COMMENT,
         *                               self::DELETED_USER = File::DELETED_USER
-        * @param $user User object to check, or null to use $wgUser
-        * @return Boolean
+        * @param User|null $user User object to check, or null to use $wgUser
+        * @return bool
         */
        public static function userCanBitfield( $bitfield, $field, User $user = null ) {
                if ( $bitfield & $field ) { // aspect is deleted
@@ -1665,9 +1665,9 @@ class Revision implements IDBAccessObject {
        /**
         * Get rev_timestamp from rev_id, without loading the rest of the row
         *
-        * @param $title Title
-        * @param $id Integer
-        * @return String
+        * @param Title $title
+        * @param int $id
+        * @return string
         */
        static function getTimestampFromId( $title, $id ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -1689,9 +1689,9 @@ class Revision implements IDBAccessObject {
        /**
         * Get count of revisions per page...not very efficient
         *
-        * @param $db DatabaseBase
-        * @param $id Integer: page id
-        * @return Integer
+        * @param DatabaseBase $db
+        * @param int $id Page id
+        * @return int
         */
        static function countByPageId( $db, $id ) {
                $row = $db->selectRow( 'revision', array( 'revCount' => 'COUNT(*)' ),
@@ -1705,9 +1705,9 @@ class Revision implements IDBAccessObject {
        /**
         * Get count of revisions per page...not very efficient
         *
-        * @param $db DatabaseBase
-        * @param $title Title
-        * @return Integer
+        * @param DatabaseBase $db
+        * @param Title $title
+        * @return int
         */
        static function countByTitle( $db, $title ) {
                $id = $title->getArticleID();
@@ -1724,11 +1724,11 @@ class Revision implements IDBAccessObject {
         *
         * @since 1.20
         *
-        * @param DatabaseBase|int $db the Database to perform the check on. May be given as a
+        * @param DatabaseBase|int $db The Database to perform the check on. May be given as a
         *        Database object or a database identifier usable with wfGetDB.
-        * @param int $pageId the ID of the page in question
-        * @param int $userId the ID of the user in question
-        * @param string $since look at edits since this time
+        * @param int $pageId The ID of the page in question
+        * @param int $userId The ID of the user in question
+        * @param string $since Look at edits since this time
         *
         * @return bool True if the given user was the only one to edit since the given timestamp
         */