Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69454


Change subject: PHPDoc cleanup of includes/ dir
......................................................................

PHPDoc cleanup of includes/ dir

Change-Id: I6d81bf5c1d4021faeac0883d7b3b2abae17865a7
---
M includes/ArrayUtils.php
M includes/Block.php
M includes/Category.php
M includes/Cdb_PHP.php
M includes/ChangesList.php
M includes/ConfEditor.php
M includes/Cookie.php
M includes/Exception.php
M includes/Fallback.php
M includes/Feed.php
M includes/FileDeleteForm.php
M includes/ForkController.php
M includes/FormOptions.php
M includes/GlobalFunctions.php
M includes/HashRing.php
M includes/Html.php
M includes/Import.php
M includes/Linker.php
M includes/Metadata.php
M includes/Namespace.php
M includes/OutputPage.php
M includes/PoolCounter.php
M includes/QueryPage.php
M includes/RecentChange.php
M includes/Revision.php
M includes/Skin.php
M includes/SkinTemplate.php
M includes/SquidPurgeClient.php
M includes/Status.php
M includes/Title.php
M includes/UIDGenerator.php
M includes/UserMailer.php
M includes/WatchedItem.php
M includes/WebRequest.php
M includes/Wiki.php
M includes/WikiPage.php
M includes/Xml.php
M includes/ZhClient.php
M includes/ZipDirectoryReader.php
M includes/specials/SpecialAllpages.php
40 files changed, 166 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/69454/1

diff --git a/includes/ArrayUtils.php b/includes/ArrayUtils.php
index 985271f..4b71e38 100644
--- a/includes/ArrayUtils.php
+++ b/includes/ArrayUtils.php
@@ -14,9 +14,9 @@
         * justification for breaking compatibility with installations
         * compiled with ./configure --disable-hash.
         *
-        * @param $array The array to sort
-        * @param $key The string key
-        * @param $separator A separator used to delimit the array elements and 
the
+        * @param array $array The array to sort
+        * @param string $key The string key
+        * @param string $separator A separator used to delimit the array 
elements and the
         *     key. This can be chosen to provide backwards compatibility with
         *     various consistent hash implementations that existed before this
         *     function was introduced.
diff --git a/includes/Block.php b/includes/Block.php
index d2f430e..3f83be9 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -1165,12 +1165,12 @@
         *  - Other softblocks are chosen over autoblocks
         *  - If there are multiple exact or range blocks at the same level, 
the one chosen
         *    is random
-
+        * @param array $blocks Array of blocks
         * @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
+        *    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, ...)
+        * @throws MWException
         * @return Block|null the "best" block from the list
         */
        public static function chooseBlock( array $blocks, array $ipChain ) {
diff --git a/includes/Category.php b/includes/Category.php
index 126b8fe..8019ee7 100644
--- a/includes/Category.php
+++ b/includes/Category.php
@@ -239,8 +239,8 @@
        /**
         * Fetch a TitleArray of up to $limit category members, beginning after 
the
         * category sort key $offset.
-        * @param $limit integer
-        * @param $offset string
+        * @param bool|int $limit
+        * @param string $offset
         * @return TitleArray object for category members.
         */
        public function getMembers( $limit = false, $offset = '' ) {
@@ -277,6 +277,7 @@
 
        /**
         * Generic accessor
+        * @param $key
         * @return bool
         */
        private function getX( $key ) {
diff --git a/includes/Cdb_PHP.php b/includes/Cdb_PHP.php
index a38b9a8..0ba55ef 100644
--- a/includes/Cdb_PHP.php
+++ b/includes/Cdb_PHP.php
@@ -68,7 +68,7 @@
         *
         * @param $s string
         *
-        * @return
+        * @return int
         */
        public static function hash( $s ) {
                $h = 5381;
@@ -312,9 +312,9 @@
        }
 
        /**
-        * @param $key
-        * @param $value
-        * @return
+        * @param string $key
+        * @param string $value
+        * @return void
         */
        public function set( $key, $value ) {
                if ( strval( $key ) === '' ) {
diff --git a/includes/ChangesList.php b/includes/ChangesList.php
index 02c02e0..cc9f772 100644
--- a/includes/ChangesList.php
+++ b/includes/ChangesList.php
@@ -465,6 +465,7 @@
 
        /**
         * Returns the string which indicates the number of watching users
+        * @param $count
         * @return string
         */
        protected function numberofWatchingusers( $count ) {
@@ -850,6 +851,7 @@
 
        /**
         * Enhanced RC group
+        * @param $block
         * @return string
         */
        protected function recentChangesBlockGroup( $block ) {
diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php
index 67cb87d..f976a56 100644
--- a/includes/ConfEditor.php
+++ b/includes/ConfEditor.php
@@ -332,6 +332,7 @@
 
        /**
         * Parse a scalar value in PHP
+        * @param $str
         * @return mixed Parsed value
         */
        function parseScalar( $str ) {
@@ -482,6 +483,7 @@
         * Find the path name of the last element in the array.
         * If the array is empty, this will return the \@extra interstitial 
element.
         * If the specified path is not found or is not an array, it will 
return false.
+        * @param $path
         * @return bool|int|string
         */
        function findLastArrayElement( $path ) {
@@ -519,6 +521,7 @@
         * Find the path name of first element in the array.
         * If the array is empty, this will return the \@extra interstitial 
element.
         * If the specified path is not found or is not an array, it will 
return false.
+        * @param $path
         * @return bool|int|string
         */
        function findFirstArrayElement( $path ) {
@@ -544,6 +547,9 @@
        /**
         * Get the indent string which sits after a given start position.
         * Returns false if the position is not at the start of the line.
+        * @param $pos
+        * @param bool $key
+        * @param bool $arrowPos
         * @return array
         */
        function getIndent( $pos, $key = false, $arrowPos = false ) {
@@ -768,6 +774,7 @@
 
        /**
         * Create a ConfEditorToken from an element of token_get_all()
+        * @param $internalToken
         * @return ConfEditorToken
         */
        function newTokenObj( $internalToken ) {
@@ -820,6 +827,7 @@
        /**
         * Get the token $offset steps ahead of the current position.
         * $offset may be negative, to get tokens behind the current position.
+        * @param $offset
         * @return ConfEditorToken
         */
        function getTokenAhead( $offset ) {
@@ -875,6 +883,7 @@
        /**
         * Returns true if the user input path is valid.
         * This exists to allow "/" and "@" to be reserved for string path keys
+        * @param $path
         * @return bool
         */
        function validatePath( $path ) {
@@ -996,6 +1005,7 @@
 
        /**
         * Get a readable name for the given token type.
+        * @param $type
         * @return string
         */
        function getTypeName( $type ) {
@@ -1010,6 +1020,8 @@
         * Looks ahead to see if the given type is the next token type, starting
         * from the current position plus the given offset. Skips any 
intervening
         * whitespace.
+        * @param $type
+        * @param int $offset
         * @return bool
         */
        function isAhead( $type, $offset = 0 ) {
diff --git a/includes/Cookie.php b/includes/Cookie.php
index 1b22c0e..fbe4134 100644
--- a/includes/Cookie.php
+++ b/includes/Cookie.php
@@ -212,6 +212,8 @@
 
        /**
         * @see Cookie::serializeToHttpRequest
+        * @param $path
+        * @param $domain
         * @return string
         */
        public function serializeToHttpRequest( $path, $domain ) {
diff --git a/includes/Exception.php b/includes/Exception.php
index dc1208a..c7b98f9 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -503,9 +503,9 @@
 class UserNotLoggedIn extends ErrorPageError {
 
        /**
-        * @param $reasonMsg A message key containing the reason for the error.
+        * @param string $reasonMsg A message key containing the reason for the 
error.
         *        Optional, default: 'exception-nologin-text'
-        * @param $titleMsg A message key to set the page title.
+        * @param string $titleMsg A message key to set the page title.
         *        Optional, default: 'exception-nologin'
         * @param $params Parameters to wfMessage().
         *        Optional, default: null
diff --git a/includes/Fallback.php b/includes/Fallback.php
index cdf6c88..3cee10b 100644
--- a/includes/Fallback.php
+++ b/includes/Fallback.php
@@ -153,7 +153,7 @@
         * Fallback implementation of mb_strpos, hardcoded to UTF-8.
         * @param $haystack String
         * @param $needle String
-        * @param string $offset optional start position
+        * @param int $offset optional start position
         * @param string $encoding optional encoding; ignored
         * @return int
         */
@@ -174,7 +174,7 @@
         * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
         * @param $haystack String
         * @param $needle String
-        * @param string $offset optional start position
+        * @param int $offset optional start position
         * @param string $encoding optional encoding; ignored
         * @return int
         */
diff --git a/includes/Feed.php b/includes/Feed.php
index 635b04e..85edfe7 100644
--- a/includes/Feed.php
+++ b/includes/Feed.php
@@ -190,7 +190,6 @@
         * @code
         * print "<feed>";
         * @endcode
-        * @param $item
         */
        abstract public function outHeader();
 
@@ -335,6 +334,7 @@
 class AtomFeed extends ChannelFeed {
        /**
         * @todo document
+        * @param $ts
         * @return string
         */
        function formatTime( $ts ) {
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php
index 9fc70eb..1b99b28 100644
--- a/includes/FileDeleteForm.php
+++ b/includes/FileDeleteForm.php
@@ -342,6 +342,7 @@
        /**
         * Is the provided `oldimage` value valid?
         *
+        * @param $oldimage
         * @return bool
         */
        public static function isValidOldSpec( $oldimage ) {
diff --git a/includes/ForkController.php b/includes/ForkController.php
index ced45af..caacdf1 100644
--- a/includes/ForkController.php
+++ b/includes/ForkController.php
@@ -150,6 +150,7 @@
        /**
         * Fork a number of worker processes.
         *
+        * @param $numProcs
         * @return string
         */
        protected function forkWorkers( $numProcs ) {
diff --git a/includes/FormOptions.php b/includes/FormOptions.php
index 530b094..cc2b492 100644
--- a/includes/FormOptions.php
+++ b/includes/FormOptions.php
@@ -320,6 +320,7 @@
        /* @{ */
        /**
         * Whether option exist
+        * @param mixed $name
         * @return bool
         */
        public function offsetExists( $name ) {
@@ -327,6 +328,7 @@
        }
        /**
         * Retrieve an option value
+        * @param mixed $name
         * @return Mixed
         */
        public function offsetGet( $name ) {
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index a44e45b..ea8f7be 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -38,6 +38,9 @@
 if ( !function_exists( 'iconv' ) ) {
        /**
         * @codeCoverageIgnore
+        * @param $from
+        * @param $to
+        * @param $string
         * @return string
         */
        function iconv( $from, $to, $string ) {
@@ -48,6 +51,9 @@
 if ( !function_exists( 'mb_substr' ) ) {
        /**
         * @codeCoverageIgnore
+        * @param $str
+        * @param $start
+        * @param string $count
         * @return string
         */
        function mb_substr( $str, $start, $count = 'end' ) {
@@ -56,6 +62,8 @@
 
        /**
         * @codeCoverageIgnore
+        * @param $str
+        * @param $splitPos
         * @return int
         */
        function mb_substr_split_unicode( $str, $splitPos ) {
@@ -66,6 +74,8 @@
 if ( !function_exists( 'mb_strlen' ) ) {
        /**
         * @codeCoverageIgnore
+        * @param $str
+        * @param string $enc
         * @return int
         */
        function mb_strlen( $str, $enc = '' ) {
@@ -76,6 +86,10 @@
 if ( !function_exists( 'mb_strpos' ) ) {
        /**
         * @codeCoverageIgnore
+        * @param $haystack
+        * @param $needle
+        * @param int $offset
+        * @param string $encoding
         * @return int
         */
        function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
@@ -87,6 +101,10 @@
 if ( !function_exists( 'mb_strrpos' ) ) {
        /**
         * @codeCoverageIgnore
+        * @param $haystack
+        * @param $needle
+        * @param int $offset
+        * @param string $encoding
         * @return int
         */
        function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
@@ -1485,7 +1503,7 @@
  *
  * @param $key String
  * @param $useDB Bool
- * @param string $langCode Code of the language to get the message for, or
+ * @param bool|string $langCode Code of the language to get the message for, or
  *                  behaves as a content language switch if it is a boolean.
  * @param $transform Boolean: whether to parse magic words, etc.
  * @return string
@@ -3428,7 +3446,7 @@
  *                belongs to. May contain a single string if the query is only
  *                in one group.
  *
- * @param string $wiki the wiki ID, or false for the current wiki
+ * @param bool|string $wiki the wiki ID, or false for the current wiki
  *
  * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request
  * will always return the same object, unless the underlying connection or load
@@ -3446,7 +3464,7 @@
 /**
  * Get a load balancer object.
  *
- * @param string $wiki wiki ID, or false for the current wiki
+ * @param bool|string $wiki wiki ID, or false for the current wiki
  * @return LoadBalancer
  */
 function wfGetLB( $wiki = false ) {
@@ -3591,9 +3609,9 @@
  * in maintenance scripts, to avoid causing too much lag.  Of course, this is
  * a no-op if there are no slaves.
  *
- * @param $maxLag Integer (deprecated)
+ * @param bool|int $maxLag Integer (deprecated)
  * @param $wiki mixed Wiki identifier accepted by wfGetLB
- * @param $cluster string cluster name accepted by LBFactory
+ * @param bool|string $cluster string cluster name accepted by LBFactory
  */
 function wfWaitForSlaves( $maxLag = false, $wiki = false, $cluster = false ) {
        $lb = ( $cluster !== false )
@@ -3839,13 +3857,13 @@
  *
  * @param string $format The format string (See php's docs)
  * @param $data: A binary string of binary data
- * @param $length integer or false: The minimum length of $data. This is to
- *     prevent reading beyond the end of $data. false to disable the check.
+ * @param bool|int $length integer or false: The minimum length of $data. This 
is to
+ *    prevent reading beyond the end of $data. false to disable the check.
  *
  * Also be careful when using this function to read unsigned 32 bit integer
  * because php might make it negative.
  *
- * @throws MWException if $data not long enough, or if unpack fails
+ * @throws MWException
  * @return array Associative array of the extracted data
  */
 function wfUnpack( $format, $data, $length = false ) {
diff --git a/includes/HashRing.php b/includes/HashRing.php
index cd39ad8..1822c10 100644
--- a/includes/HashRing.php
+++ b/includes/HashRing.php
@@ -34,6 +34,7 @@
 
        /**
         * @param array $map (location => weight)
+        * @throws MWException
         */
        public function __construct( array $map ) {
                $map = array_filter( $map, function( $w ) { return $w > 0; } );
diff --git a/includes/Html.php b/includes/Html.php
index 1d45e6a..9a046fc 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -855,8 +855,8 @@
         * @param string $text wikitext, get this with wfMessage()->plain()
         * @param string $icon icon name, file in skins/common/images
         * @param string $alt alternate text for the icon
-        * @param string $class additional class name to add to the wrapper div
-        * @param $useStylePath
+        * @param bool|string $class additional class name to add to the 
wrapper div
+        * @param bool $useStylePath
         *
         * @return string
         */
diff --git a/includes/Import.php b/includes/Import.php
index 8b7af02..a04ca30 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -291,7 +291,7 @@
         * @param $revCount
         * @param $sRevCount
         * @param $pageInfo
-        * @return
+        * @return bool
         */
        public function finishImportPage( $title, $origTitle, $revCount, 
$sRevCount, $pageInfo ) {
                $args = func_get_args();
diff --git a/includes/Linker.php b/includes/Linker.php
index 3529d28..0dc7fe6 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -260,6 +260,11 @@
 
        /**
         * Identical to link(), except $options defaults to 'known'.
+        * @param $target
+        * @param null $html
+        * @param array $customAttribs
+        * @param array $query
+        * @param array $options
         * @return string
         */
        public static function linkKnown(
@@ -555,7 +560,7 @@
         *
         * @param array $handlerParams associative array of media handler 
parameters, to be passed
         *       to transform(). Typical keys are "width" and "page".
-        * @param string $time timestamp of the file, set as false for current
+        * @param bool|string $time timestamp of the file, set as false for 
current
         * @param string $query query params for desc url
         * @param $widthOption: Used by the parser to remember the user 
preference thumbnailsize
         * @since 1.20
@@ -710,6 +715,7 @@
         * frame parameters supplied by the Parser.
         * @param array $frameParams The frame parameters
         * @param string $query An optional query string to add to description 
page links
+        * @param null $parser
         * @return array
         */
        private static function getImageLinkMTOParams( $frameParams, $query = 
'', $parser = null ) {
@@ -931,8 +937,8 @@
         * @param $title Title object
         * @param string $label link label (plain text)
         * @param string $query query string
-        * @param $unused1 Unused parameter kept for b/c
-        * @param $unused2 Unused parameter kept for b/c
+        * @param string $unused1 Unused parameter kept for b/c
+        * @param string $unused2 Unused parameter kept for b/c
         * @param $time Boolean: a file of a certain timestamp was requested
         * @return String
         */
@@ -997,7 +1003,7 @@
         *
         * @param $title Title object.
         * @param string $html pre-sanitized HTML
-        * @param string $time MW timestamp of file creation time
+        * @param bool|string $time MW timestamp of file creation time
         * @return String: HTML
         */
        public static function makeMediaLinkObj( $title, $html = '', $time = 
false ) {
@@ -1037,6 +1043,8 @@
         * a message key from the link text.
         * Usage example: Linker::specialLink( 'Recentchanges' )
         *
+        * @param string $name
+        * @param string $key
         * @return string
         */
        public static function specialLink( $name, $key = '' ) {
@@ -1091,7 +1099,7 @@
         * Make user link (or user contributions for unregistered users)
         * @param $userId   Integer: user id in database.
         * @param string $userName user name in database.
-        * @param string $altUserName text to display instead of the user name 
(optional)
+        * @param bool|string $altUserName text to display instead of the user 
name (optional)
         * @return String: HTML fragment
         * @since 1.19 Method exists for a long time. $altUserName was added in 
1.19.
         */
@@ -1645,6 +1653,7 @@
        /**
         * Finish one or more sublevels on the Table of Contents
         *
+        * @param int $level
         * @return string
         */
        public static function tocUnindent( $level ) {
@@ -1654,6 +1663,11 @@
        /**
         * parameter level defines if we are on an indentation level
         *
+        * @param $anchor
+        * @param $tocline
+        * @param $tocnumber
+        * @param $level
+        * @param bool $sectionIndex
         * @return string
         */
        public static function tocLine( $anchor, $tocline, $tocnumber, $level, 
$sectionIndex = false ) {
@@ -1681,8 +1695,8 @@
         * Wraps the TOC in a table and provides the hide/collapse javascript.
         *
         * @param string $toc html of the Table Of Contents
-        * @param $lang String|Language|false: Language for the toc title, 
defaults to user language
-        * @return String: full html of the TOC
+        * @param bool|Language|string $lang Language for the toc title, 
defaults to user language
+        * @return string: full html of the TOC
         */
        public static function tocList( $toc, $lang = false ) {
                $lang = wfGetLangObj( $lang );
@@ -1752,6 +1766,7 @@
        /**
         * Split a link trail, return the "inside" portion and the remainder of 
the trail
         * as a two-element array
+        * @param $trail
         * @return array
         */
        static function splitTrail( $trail ) {
@@ -1881,8 +1896,8 @@
         *
         * @param $rev Revision object
         * @param $context IContextSource context to use or null for the main 
context.
-        * @param $editCount integer Number of edits that would be reverted
-        * @return String: HTML fragment
+        * @param bool|int $editCount Number of edits that would be reverted
+        * @return string: HTML fragment
         */
        public static function buildRollbackLink( $rev, IContextSource $context 
= null, $editCount = false ) {
                global $wgShowRollbackEditCount, $wgMiserMode;
@@ -2157,7 +2172,7 @@
         *
         * @param User $user
         * @param Revision $rev
-        * @param Revision $title
+        * @param Title $title
         * @return string HTML fragment
         */
        public static function getRevDeleteLink( User $user, Revision $rev, 
Title $title ) {
@@ -2385,6 +2400,7 @@
 
        /**
         * Returns the attributes for the tooltip and access key.
+        * @param $name
         * @return array
         */
        public static function tooltipAndAccesskeyAttribs( $name ) {
@@ -2406,6 +2422,8 @@
 
        /**
         * Returns raw bits of HTML, use titleAttrib()
+        * @param $name
+        * @param null $options
         * @return null|string
         */
        public static function tooltip( $name, $options = null ) {
diff --git a/includes/Metadata.php b/includes/Metadata.php
index cd77ef8..5377ae0 100644
--- a/includes/Metadata.php
+++ b/includes/Metadata.php
@@ -28,7 +28,7 @@
 
        /**
         * Constructor
-        * @param $article Article object
+        * @param Page $article Article object
         */
        public function __construct( Page $article ) {
                $this->mArticle = $article;
diff --git a/includes/Namespace.php b/includes/Namespace.php
index 8001b41..f5c8fef 100644
--- a/includes/Namespace.php
+++ b/includes/Namespace.php
@@ -91,6 +91,7 @@
        /**
         * @see self::isSubject
         * @deprecated Please use the more consistently named isSubject (since 
1.19)
+        * @param $index
         * @return bool
         */
        public static function isMain( $index ) {
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3657ac3..7dd3137 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2107,7 +2107,7 @@
         * and optionally an custom HTML title (content of the "<title>" tag).
         *
         * @param string|Message $pageTitle will be passed directly to 
setPageTitle()
-        * @param string|Message $htmlTitle will be passed directly to 
setHTMLTitle();
+        * @param bool|Message|string $htmlTitle will be passed directly to 
setHTMLTitle();
         *                   optional, if not passed the "<title>" attribute 
will be
         *                   based on $pageTitle
         */
@@ -2429,7 +2429,7 @@
         * @param $title Title to link
         * @param array $query query string parameters
         * @param string $text text of the link (input is not escaped)
-        * @param $options Options array to pass to Linker
+        * @param array $options Options array to pass to Linker
         */
        public function addReturnTo( $title, $query = array(), $text = null, 
$options = array() ) {
                if ( in_array( 'http', $options ) ) {
diff --git a/includes/PoolCounter.php b/includes/PoolCounter.php
index 2dac938..d1ec722 100644
--- a/includes/PoolCounter.php
+++ b/includes/PoolCounter.php
@@ -173,6 +173,7 @@
 
        /**
         * Do something with the error, like showing it to the user.
+        * @param $status
         * @return bool
         */
        function error( $status ) {
diff --git a/includes/QueryPage.php b/includes/QueryPage.php
index a93639a..1066e1a 100644
--- a/includes/QueryPage.php
+++ b/includes/QueryPage.php
@@ -403,6 +403,7 @@
        /**
         * Somewhat deprecated, you probably want to be using execute()
         * @param int|bool $offset
+        * @param bool $limit
         * @oaram int|bool $limit
         * @return ResultWrapper
         */
@@ -458,7 +459,7 @@
        /**
         * This is the actual workhorse. It does everything needed to make a
         * real, honest-to-gosh query page.
-        * @para $par
+        * @param $par
         * @return int
         */
        function execute( $par ) {
diff --git a/includes/RecentChange.php b/includes/RecentChange.php
index 24db569..15c6cc5 100644
--- a/includes/RecentChange.php
+++ b/includes/RecentChange.php
@@ -300,7 +300,7 @@
         * @param string $line text to send
         * @param string $address defaults to $wgRC2UDPAddress.
         * @param string $prefix defaults to $wgRC2UDPPrefix.
-        * @param int $port defaults to $wgRC2UDPPort. (Since 1.17)
+        * @param int|string $port defaults to $wgRC2UDPPort. (Since 1.17)
         * @return Boolean: success
         */
        public static function sendToUDP( $line, $address = '', $prefix = '', 
$port = '' ) {
diff --git a/includes/Revision.php b/includes/Revision.php
index b3b971b..5d38465 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1160,18 +1160,18 @@
        }
 
        /**
-         * Get revision text associated with an old or archive row
-         * $row is usually an object from wfFetchRow(), both the flags and the 
text
-         * field must be included
-         *
-         * @param $row Object: the text data
-         * @param string $prefix table prefix (default 'old_')
-         * @param string|false $wiki the name of the wiki to load the revision 
text from
-         *         (same as the the wiki $row was loaded from) or false to 
indicate the local
-         *         wiki (this is the default). Otherwise, it must be a 
symbolic wiki database
-         *         identifier as understood by the LoadBalancer class.
-         * @return String: text the text requested or false on failure
-         */
+        * Get revision text associated with an old or archive row
+        * $row is usually an object from wfFetchRow(), both the flags and the 
text
+        * field must be included
+        *
+        * @param $row Object: the text data
+        * @param string $prefix table prefix (default 'old_')
+        * @param string|bool $wiki the name of the wiki to load the revision 
text from
+        *         (same as the the wiki $row was loaded from) or false to 
indicate the local
+        *         wiki (this is the default). Otherwise, it must be a symbolic 
wiki database
+        *         identifier as understood by the LoadBalancer class.
+        * @return String: text the text requested or false on failure
+        */
        public static function getRevisionText( $row, $prefix = 'old_', $wiki = 
false ) {
                wfProfileIn( __METHOD__ );
 
diff --git a/includes/Skin.php b/includes/Skin.php
index 53003c6..cba2f18 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1561,7 +1561,7 @@
         *   to be included in the link, like "&section=$section"
         * @param string $tooltip The tooltip to use for the link: will be 
escaped
         *   and wrapped in the 'editsectionhint' message
-        * @param $lang    string Language code
+        * @param bool|string $lang Language code
         * @return         string HTML to use for edit link
         */
        public function doEditSectionLink( Title $nt, $section, $tooltip = 
null, $lang = false ) {
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index fa90954..6a40b46 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -113,8 +113,8 @@
         * roughly equivalent to PHPTAL 0.7.
         *
         * @param $classname String
-        * @param string $repository subdirectory where we keep template files
-        * @param $cache_dir string
+        * @param bool|string $repository subdirectory where we keep template 
files
+        * @param bool|string $cache_dir string
         * @return QuickTemplate
         * @private
         */
@@ -1104,6 +1104,7 @@
 
        /**
         * an array of edit links by default used for the tabs
+        * @param $content_navigation
         * @return array
         * @private
         */
@@ -1373,6 +1374,7 @@
 
        /**
         * @private
+        * @param $str
         * @return bool
         */
        function haveData( $str ) {
@@ -1382,6 +1384,7 @@
        /**
         * @private
         *
+        * @param $str
         * @return bool
         */
        function haveMsg( $str ) {
@@ -1877,6 +1880,7 @@
         * If you pass "flat" as an option then the returned array will be a 
flat array
         * of footer icons instead of a key/value array of footerlinks arrays 
broken
         * up into categories.
+        * @param null $option
         * @return array|mixed
         */
        function getFooterLinks( $option = null ) {
@@ -1916,7 +1920,8 @@
         * in the list of footer icons. This is mostly useful for skins which 
only
         * display the text from footericons instead of the images and don't 
want a
         * duplicate copyright statement because footerlinks already rendered 
one.
-        * @return
+        * @param null $option
+        * @return mixed
         */
        function getFooterIcons( $option = null ) {
                // Generate additional footer icons
diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php
index f5fd195..82044db 100644
--- a/includes/SquidPurgeClient.php
+++ b/includes/SquidPurgeClient.php
@@ -324,7 +324,7 @@
 
        /**
         * @param $line
-        * @return
+        * @return void
         */
        protected function processStatusLine( $line ) {
                if ( !preg_match( '!^HTTP/(\d+)\.(\d+) (\d{3}) (.*)$!', $line, 
$m ) ) {
diff --git a/includes/Status.php b/includes/Status.php
index f0253df..61e356e 100644
--- a/includes/Status.php
+++ b/includes/Status.php
@@ -167,9 +167,9 @@
        /**
         * Get the error list as a wikitext formatted list
         *
-        * @param string $shortContext a short enclosing context message name, 
to
+        * @param bool|string $shortContext a short enclosing context message 
name, to
         *        be used when there is a single error
-        * @param string $longContext a long enclosing context message name, 
for a list
+        * @param bool|string $longContext a long enclosing context message 
name, for a list
         * @return String
         */
        function getWikiText( $shortContext = false, $longContext = false ) {
diff --git a/includes/Title.php b/includes/Title.php
index 9d42b2f..e595e8c 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1380,10 +1380,10 @@
         *
         * @see self::getLocalURL
         * @see wfExpandUrl
-        * @param $query
-        * @param $query2 bool
-        * @param $proto Protocol type to use in URL
-        * @return String the URL
+        * @param string $query
+        * @param bool $query2
+        * @param string $proto Protocol type to use in URL
+        * @return string the URL
         */
        public function getFullURL( $query = '', $query2 = false, $proto = 
PROTO_RELATIVE ) {
                $query = self::fixUrlQueryArgs( $query, $query2 );
@@ -1507,9 +1507,9 @@
         *
         * See getLocalURL for the arguments.
         *
-        * @param $query
+        * @param string $query
         * @param $query2 bool
-        * @param $proto Protocol to use; setting this will cause a full URL to 
be used
+        * @param string $proto Protocol to use; setting this will cause a full 
URL to be used
         * @see self::getLocalURL
         * @return String the URL
         */
@@ -1550,6 +1550,8 @@
         * See getLocalURL for the arguments.
         *
         * @see self::getLocalURL
+        * @param string $query
+        * @param bool $query2
         * @return String the URL
         * @deprecated since 1.19
         */
@@ -1570,6 +1572,8 @@
         * See getLocalURL for the arguments.
         *
         * @see self::getLocalURL
+        * @param string $query
+        * @param bool $query2
         * @return String the URL
         */
        public function getInternalURL( $query = '', $query2 = false ) {
@@ -1591,6 +1595,8 @@
         * See getLocalURL for the arguments.
         *
         * @see self::getLocalURL
+        * @param string $query
+        * @param bool $query2
         * @return string The URL
         * @since 1.18
         */
@@ -1608,6 +1614,8 @@
         *
         * @see self::getLocalURL
         * @since 1.18
+        * @param string $query
+        * @param bool $query2
         * @return string
         * @deprecated since 1.19
         */
diff --git a/includes/UIDGenerator.php b/includes/UIDGenerator.php
index 20ec302..0cc5125 100644
--- a/includes/UIDGenerator.php
+++ b/includes/UIDGenerator.php
@@ -110,7 +110,8 @@
        }
 
        /**
-        * @param array $time (UIDGenerator::millitime(), clock sequence)
+        * @param array $info UIDGenerator::millitime(), clock sequence
+        * @throws MWException
         * @return string 88 bits
         */
        protected function getTimestampedID88( array $info ) {
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index 2a549ac..9b15272 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -405,6 +405,8 @@
         * This method is doing Q encoding inside encoded-words as defined by 
RFC 2047
         * This is for email headers.
         * The built in quoted_printable_encode() is for email bodies
+        * @param $string
+        * @param string $charset
         * @return string
         */
        public static function quotedPrintable( $string, $charset = '' ) {
diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php
index 45aa822..a7845bd 100644
--- a/includes/WatchedItem.php
+++ b/includes/WatchedItem.php
@@ -137,7 +137,7 @@
        /**
         * Reset the notification timestamp of this entry
         *
-        * @param $force Whether to force the write query to be executed even 
if the
+        * @param string $force Whether to force the write query to be executed 
even if the
         *        page is not watched or the notification timestamp is already 
NULL.
         */
        public function resetNotificationTimestamp( $force = '' ) {
diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index dbd0740..b19bbbf 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -235,7 +235,7 @@
         *
         * @param string $path the URL path given from the client
         * @param array $bases one or more URLs, optionally with $1 at the end
-        * @param string $key if provided, the matching key in $bases will be
+        * @param bool|string $key if provided, the matching key in $bases will 
be
         *             passed on as the value of this URL parameter
         * @return array of URL variables to interpolate; empty if no match
         */
diff --git a/includes/Wiki.php b/includes/Wiki.php
index cb0f60a..48061ce 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -406,7 +406,7 @@
         * Perform one of the "standard" actions
         *
         * @param $page Page
-        * @param $requestTitle The original title, before any redirects were 
applied
+        * @param Title $requestTitle The original title, before any redirects 
were applied
         */
        private function performAction( Page $page, Title $requestTitle ) {
                global $wgUseSquid, $wgSquidMaxage;
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 9e6a0c8..248c9e4 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -1024,7 +1024,7 @@
        /**
         * Get the last N authors
         * @param $num Integer: number of revisions to get
-        * @param string $revLatest the latest rev_id, selected from the master 
(optional)
+        * @param int|string $revLatest the latest rev_id, selected from the 
master (optional)
         * @return array Array of authors, duplicates not removed
         */
        public function getLastNAuthors( $num, $revLatest = 0 ) {
@@ -2165,7 +2165,7 @@
         * @param string $text text submitted
         * @param $user User The relevant user
         * @param string $comment comment submitted
-        * @param $minor Boolean: whereas it's a minor modification
+        * @param bool|int $minor Boolean: whereas it's a minor modification
         *
         * @deprecated since 1.21, use doEditContent() instead.
         */
@@ -2184,8 +2184,8 @@
         * @param $content Content: content submitted
         * @param $user User The relevant user
         * @param string $comment comment submitted
+        * @param bool|int $minor Boolean: whereas it's a minor modification
         * @param $serialisation_format String: format for storing the content 
in the database
-        * @param $minor Boolean: whereas it's a minor modification
         */
        public function doQuickEditContent( Content $content, User $user, 
$comment = '', $minor = 0, $serialisation_format = null ) {
                wfProfileIn( __METHOD__ );
@@ -2494,7 +2494,7 @@
         *        the suppression log instead of the deletion log
         * @param int $id article ID
         * @param $commit boolean defaults to true, triggers transaction end
-        * @param &$error Array of errors to append to
+        * @param array|string $error Array of errors to append to
         * @param $user User The deleting user
         * @return boolean true if successful
         */
@@ -2516,7 +2516,7 @@
         *        the suppression log instead of the deletion log
         * @param int $id article ID
         * @param $commit boolean defaults to true, triggers transaction end
-        * @param &$error Array of errors to append to
+        * @param Array|string $error
         * @param $user User The deleting user
         * @return Status: Status object; if successful, $status->value is the 
log_id of the
         *                 deletion log entry. If the page couldn't be deleted 
because it wasn't
diff --git a/includes/Xml.php b/includes/Xml.php
index 223061a..712df4f 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -285,7 +285,7 @@
        /**
         * Convenience function to build an HTML text input field
         * @param string $name value of the name attribute
-        * @param int $size value of the size attribute
+        * @param bool|int $size value of the size attribute
         * @param $value mixed value of the value attribute
         * @param array $attribs other attributes
         * @return string HTML
@@ -307,7 +307,7 @@
        /**
         * Convenience function to build an HTML password input field
         * @param string $name value of the name attribute
-        * @param int $size value of the size attribute
+        * @param bool|int $size value of the size attribute
         * @param $value mixed value of the value attribute
         * @param array $attribs other attributes
         * @return string HTML
@@ -554,7 +554,7 @@
         * Shortcut for creating fieldsets.
         *
         * @param string|bool $legend Legend of the fieldset. If evaluates to 
false, legend is not added.
-        * @param string $content Pre-escaped content for the fieldset. If 
false, only open fieldset is returned.
+        * @param bool|string $content Pre-escaped content for the fieldset. If 
false, only open fieldset is returned.
         * @param array $attribs Any attributes to fieldset-element.
         *
         * @return string
diff --git a/includes/ZhClient.php b/includes/ZhClient.php
index c5955ae..b249f99 100644
--- a/includes/ZhClient.php
+++ b/includes/ZhClient.php
@@ -69,6 +69,7 @@
         *
         * @access private
         *
+        * @param $request
         * @return string
         */
        function query( $request ) {
diff --git a/includes/ZipDirectoryReader.php b/includes/ZipDirectoryReader.php
index 307efce..fb3974b 100644
--- a/includes/ZipDirectoryReader.php
+++ b/includes/ZipDirectoryReader.php
@@ -446,6 +446,7 @@
 
        /**
         * Interpret ZIP64 "extra field" data and return an associative array.
+        * @param $extraField
         * @return array|bool
         */
        function unpackZip64Extra( $extraField ) {
@@ -541,6 +542,7 @@
         * If there are not enough bytes in the file to satisfy the request, the
         * return value will be truncated. If a request is made for a segment 
beyond
         * the end of the file, an empty string will be returned.
+        * @param $segIndex
         * @return string
         */
        function getSegment( $segIndex ) {
@@ -564,6 +566,7 @@
 
        /**
         * Get the size of a structure in bytes. See unpack() for the format of 
$struct.
+        * @param $struct
         * @return int
         */
        function getStructSize( $struct ) {
diff --git a/includes/specials/SpecialAllpages.php 
b/includes/specials/SpecialAllpages.php
index a082049..61cf872 100644
--- a/includes/specials/SpecialAllpages.php
+++ b/includes/specials/SpecialAllpages.php
@@ -342,9 +342,9 @@
 
        /**
         * @param int $namespace Namespace (Default NS_MAIN)
-        * @param string $from list all pages from this name (default FALSE)
-        * @param string $to list all pages to this name (default FALSE)
-        * @param bool $hideredirects dont show redirects (default FALSE)
+        * @param bool|string $from list all pages from this name (default 
FALSE)
+        * @param bool|string $to list all pages to this name (default FALSE)
+        * @param bool $hideredirects don't show redirects (default FALSE)
         */
        function showChunk( $namespace = NS_MAIN, $from = false, $to = false, 
$hideredirects = false ) {
                $output = $this->getOutput();

-- 
To view, visit https://gerrit.wikimedia.org/r/69454
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d81bf5c1d4021faeac0883d7b3b2abae17865a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to