Fixing some of the "@return true" or "@return false", need to be "@return bool" and...
authorSam Reed <reedy@users.mediawiki.org>
Thu, 9 Feb 2012 19:29:36 +0000 (19:29 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 9 Feb 2012 19:29:36 +0000 (19:29 +0000)
Other documentation improvements

31 files changed:
includes/Linker.php
includes/LocalisationCache.php
includes/OutputPage.php
includes/SiteConfiguration.php
includes/Skin.php
includes/Title.php
includes/WebRequest.php
includes/WikiPage.php
includes/Xml.php
includes/ZipDirectoryReader.php
includes/logging/LogFormatter.php
includes/logging/LogPage.php
includes/media/BitmapMetadataHandler.php
includes/media/FormatMetadata.php
includes/media/Generic.php
includes/media/JpegMetadataExtractor.php
includes/objectcache/BagOStuff.php
includes/parser/Parser.php
includes/parser/Parser_LinkHooks.php
includes/parser/Tidy.php
includes/profiler/Profiler.php
includes/resourceloader/ResourceLoader.php
includes/search/SearchEngine.php
includes/search/SearchMySQL.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialUndelete.php
includes/upload/UploadBase.php
includes/upload/UploadFromChunks.php
includes/upload/UploadFromStash.php

index 15a91c1..6c00903 100644 (file)
@@ -609,8 +609,9 @@ class Linker {
        /**
         * Get the link parameters for MediaTransformOutput::toHtml() from given
         * frame parameters supplied by the Parser.
-        * @param $frameParams The frame parameters
-        * @param $query An optional query string to add to description page links
+        * @param $frameParams array The frame parameters
+        * @param $query string An optional query string to add to description page links
+        * @return array
         */
        private static function getImageLinkMTOParams( $frameParams, $query = '' ) {
                $mtoParams = array();
@@ -1126,7 +1127,7 @@ class Linker {
         * Called by Linker::formatComment.
         *
         * @param $comment String: comment text
-        * @param $title An optional title object used to links to sections
+        * @param $title Title|null An optional title object used to links to sections
         * @param $local Boolean: whether section links should refer to local page
         * @return String: formatted comment
         */
@@ -1205,7 +1206,7 @@ class Linker {
         *
         * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
         * @param $comment String: text to format links in
-        * @param $title An optional title object used to links to sections
+        * @param $title Title|null An optional title object used to links to sections
         * @param $local Boolean: whether section links should refer to local page
         * @return String
         */
@@ -1498,7 +1499,7 @@ class Linker {
         * Generate a table of contents from a section tree
         * Currently unused.
         *
-        * @param $tree Return value of ParserOutput::getSections()
+        * @param $tree array Return value of ParserOutput::getSections()
         * @return String: HTML fragment
         */
        public static function generateTOC( $tree ) {
@@ -1708,7 +1709,7 @@ class Linker {
         * Format a size in bytes for output, using an appropriate
         * unit (B, KB, MB or GB) according to the magnitude in question
         *
-        * @param $size Size to format
+        * @param $size int Size to format
         * @return String
         */
        public static function formatSize( $size ) {
@@ -1944,7 +1945,7 @@ class Linker {
         * @param $prefix String: text before link text
         * @param $aprops String: extra attributes to the a-element
         * @param $style  String: style to apply - if empty, use getInternalLinkAttributesObj instead
-        * @return the a-element
+        * @return string the a-element
         */
        static function makeKnownLinkObj(
                $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
index 3b1f45c..7e3a09c 100644 (file)
@@ -793,8 +793,8 @@ class LocalisationCache {
 interface LCStore {
        /**
         * Get a value.
-        * @param $code Language code
-        * @param $key Cache key
+        * @param $code string Language code
+        * @param $key string Cache key
         */
        function get( $code, $key );
 
@@ -1164,4 +1164,4 @@ class LocalisationCache_BulkLoad extends LocalisationCache {
                        $this->unload( $code );
                }
        }
-}
\ No newline at end of file
+}
index 9723690..2cc6f4c 100644 (file)
@@ -1309,7 +1309,7 @@ class OutputPage extends ContextSource {
        /**
         * Get/set the ParserOptions object to use for wikitext parsing
         *
-        * @param $options either the ParserOption to use or null to only get the
+        * @param $options ParserOptions|null either the ParserOption to use or null to only get the
         *                 current ParserOption object
         * @return ParserOptions object
         */
@@ -2344,7 +2344,7 @@ $templates
         * Add a "return to" link pointing to a specified title,
         * or the title indicated in the request, or else the main page
         *
-        * @param $unused No longer used
+        * @param $unused
         * @param $returnto Title or String to return to
         * @param $returntoquery String: query string for the return to link
         */
@@ -2932,7 +2932,7 @@ $templates
        }
 
        /**
-        * @param $unused Unused
+        * @param $unused
         * @param $addContentType bool
         *
         * @return string HTML tag links to be put in the header.
index 8a977fb..bd5e4d8 100644 (file)
@@ -210,7 +210,7 @@ class SiteConfiguration {
         * @param $setting String ID of the setting name to retrieve
         * @param $wiki String Wiki ID of the wiki in question.
         * @param $suffix String The suffix of the wiki in question.
-        * @param $var Reference The variable to insert the value into.
+        * @param $var array Reference The variable to insert the value into.
         * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
         * @param $wikiTags Array The tags assigned to the wiki.
         */
index 4d015eb..908a4c9 100644 (file)
@@ -317,7 +317,7 @@ abstract class Skin extends ContextSource {
         * Make a <script> tag containing global variables
         *
         * @deprecated in 1.19
-        * @param $unused Unused
+        * @param $unused
         * @return string HTML fragment
         */
        public static function makeGlobalVariablesScript( $unused ) {
index b5f9db4..53be6b9 100644 (file)
@@ -1284,7 +1284,7 @@ class Title {
         * with action=render, $wgServer is prepended.
         *
 
-        * @param $query \twotypes{\string,\array} an optional query string,
+        * @param $query string|array an optional query string,
         *   not used for interwiki     links. Can be specified as an associative array as well,
         *   e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
         *   Some query patterns will trigger various shorturl path replacements.
index cd0fd20..fc41589 100644 (file)
@@ -298,8 +298,8 @@ class WebRequest {
        /**
         * Recursively normalizes UTF-8 strings in the given array.
         *
-        * @param $data string or array
-        * @return cleaned-up version of the given
+        * @param $data string|array
+        * @return array|string cleaned-up version of the given
         * @private
         */
        function normalizeUnicode( $data ) {
index 9cf031f..b66b01a 100644 (file)
@@ -1023,7 +1023,7 @@ class WikiPage extends Page {
         * @param $dbw DatabaseBase
         * @param $redirectTitle Title object pointing to the redirect target,
         *                       or NULL if this is not a redirect
-        * @param $lastRevIsRedirect If given, will optimize adding and
+        * @param $lastRevIsRedirect null|bool If given, will optimize adding and
         *                           removing rows in redirect table.
         * @return bool true on success, false on failure
         * @private
@@ -1124,7 +1124,7 @@ class WikiPage extends Page {
        }
 
        /**
-        * @param $section empty/null/false or a section number (0, 1, 2, T1, T2...)
+        * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...)
         * @param $text String: new text of the section
         * @param $sectionTitle String: new section's subject, only if $section is 'new'
         * @param $edittime String: revision timestamp or null to use the current revision
@@ -1223,7 +1223,7 @@ class WikiPage extends Page {
         * edit-already-exists error will be returned. These two conditions are also possible with
         * auto-detection due to MediaWiki's performance-optimised locking strategy.
         *
-        * @param $baseRevId the revision ID this edit was based off, if any
+        * @param $baseRevId int the revision ID this edit was based off, if any
         * @param $user User the user doing the edit
         *
         * @return Status object. Possible errors:
@@ -1917,7 +1917,7 @@ class WikiPage extends Page {
         * Deletes the article with database consistency, writes logs, purges caches
         *
         * @param $reason string delete reason for deletion log
-        * @param $suppress bitfield
+        * @param $suppress int bitfield
         *      Revision::DELETED_TEXT
         *      Revision::DELETED_COMMENT
         *      Revision::DELETED_USER
@@ -1940,7 +1940,7 @@ class WikiPage extends Page {
         * Deletes the article with database consistency, writes logs, purges caches
         *
         * @param $reason string delete reason for deletion log
-        * @param $suppress bitfield
+        * @param $suppress int bitfield
         *      Revision::DELETED_TEXT
         *      Revision::DELETED_COMMENT
         *      Revision::DELETED_USER
@@ -2829,7 +2829,7 @@ class PoolWorkArticleView extends PoolCounterWork {
        private $text;
 
        /**
-        * @var ParserOutput|false
+        * @var ParserOutput|bool
         */
        private $parserOutput = false;
 
@@ -2839,7 +2839,7 @@ class PoolWorkArticleView extends PoolCounterWork {
        private $isDirty = false;
 
        /**
-        * @var Status|false
+        * @var Status|bool
         */
        private $error = false;
 
@@ -2883,7 +2883,7 @@ class PoolWorkArticleView extends PoolCounterWork {
        /**
         * Get a Status object in case of error or false otherwise
         *
-        * @return Status|false
+        * @return Status|bool
         */
        public function getError() {
                return $this->error;
index 6797e64..67e13fd 100644 (file)
@@ -529,8 +529,8 @@ class Xml {
        /**
         * Shortcut for creating fieldsets.
         *
-        * @param $legend Legend of the fieldset. If evaluates to false, legend is not added.
-        * @param $content Pre-escaped content for the fieldset. If false, only open fieldset is returned.
+        * @param $legend string|bool Legend of the fieldset. If evaluates to false, legend is not added.
+        * @param $content string Pre-escaped content for the fieldset. If false, only open fieldset is returned.
         * @param $attribs array Any attributes to fieldset-element.
         *
         * @return string
index 37934ae..a7a2b94 100644 (file)
@@ -297,7 +297,7 @@ class ZipDirectoryReader {
         * Find the location of the central directory, as would be seen by a
         * ZIP64-compliant reader.
         *
-        * @return List containing offset, size and end position.
+        * @return array List containing offset, size and end position.
         */
        function findZip64CentralDirectory() {
                // The spec is ambiguous about the exact rules of precedence between the
@@ -473,8 +473,8 @@ class ZipDirectoryReader {
         * Get the file contents from a given offset. If there are not enough bytes
         * in the file to satisfy the request, an exception will be thrown.
         *
-        * @param $start The byte offset of the start of the block.
-        * @param $length The number of bytes to return. If omitted, the remainder
+        * @param $start int The byte offset of the start of the block.
+        * @param $length int The number of bytes to return. If omitted, the remainder
         *    of the file will be returned.
         *
         * @return string
@@ -560,9 +560,9 @@ class ZipDirectoryReader {
         * Unpack a binary structure. This is like the built-in unpack() function
         * except nicer.
         *
-        * @param $string The binary data input
+        * @param $string string The binary data input
         *
-        * @param $struct An associative array giving structure members and their
+        * @param $struct array An associative array giving structure members and their
         *    types. In the key is the field name. The value may be either an
         *    integer, in which case the field is a little-endian unsigned integer
         *    encoded in the given number of bytes, or an array, in which case the
@@ -571,9 +571,9 @@ class ZipDirectoryReader {
         *       - "string": The second array element gives the length of string.
         *          Not null terminated.
         *
-        * @param $offset The offset into the string at which to start unpacking.
+        * @param $offset int The offset into the string at which to start unpacking.
         *
-        * @return Unpacked associative array. Note that large integers in the input
+        * @return array Unpacked associative array. Note that large integers in the input
         *    may be represented as floating point numbers in the return value, so
         *    the use of weak comparison is advised.
         */
@@ -628,7 +628,8 @@ class ZipDirectoryReader {
         * boolean.
         *
         * @param $value integer
-        * @param $bitIndex The index of the bit, where 0 is the LSB.
+        * @param $bitIndex int The index of the bit, where 0 is the LSB.
+        * @return bool
         */
        function testBit( $value, $bitIndex ) {
                return (bool)( ( $value >> $bitIndex ) & 1 );
index 322a250..945660c 100644 (file)
@@ -165,7 +165,7 @@ class LogFormatter {
         * Returns a sentence describing the log action. Usually
         * a Message object is returned, but old style log types
         * and entries might return pre-escaped html string.
-        * @return Message|pre-escaped html
+        * @return Message|string pre-escaped html
         */
        protected function getActionMessage() {
                $message = $this->msg( $this->getMessageKey() );
index bbb4de8..3951a04 100644 (file)
@@ -522,7 +522,7 @@ class LogPage {
         * Convert a comma-delimited list of block log flags
         * into a more readable (and translated) form
         *
-        * @param $flags Flags to format
+        * @param $flags string Flags to format
         * @param $lang Language object to use
         * @return String
         */
index 1a4da35..d158fe4 100644 (file)
@@ -122,7 +122,7 @@ class BitmapMetadataHandler {
        /** Main entry point for jpeg's.
         *
         * @param $filename string filename (with full path)
-        * @return metadata result array.
+        * @return array metadata result array.
         * @throws MWException on invalid file.
         */
        static function Jpeg ( $filename ) {
index 91cb691..7125c96 100644 (file)
@@ -1021,7 +1021,7 @@ class FormatMetadata {
         * @private
         *
         * @param $num Mixed: the value to format
-        * @param $round digits to round to or false.
+        * @param $round float|int digits to round to or false.
         * @return mixed A floating point number or whatever we were fed
         */
        static function formatNum( $num, $round = false ) {
@@ -1102,7 +1102,8 @@ class FormatMetadata {
                return $a;
        }
 
-       /** Fetch the human readable version of a news code.
+       /**
+        * Fetch the human readable version of a news code.
         * A news code is an 8 digit code. The first two 
         * digits are a general classification, so we just
         * translate that.
@@ -1111,7 +1112,7 @@ class FormatMetadata {
         * a string, not an int.
         *
         * @param $val String: The 8 digit news code.
-        * @return The human readable form
+        * @return srting The human readable form
         */
        static private function convertNewsCode( $val ) {
                if ( !preg_match( '/^\d{8}$/D', $val ) ) {
index 5349ade..b118309 100644 (file)
@@ -471,7 +471,7 @@ abstract class MediaHandler {
         * match the handler class, a Status object should be returned containing
         * relevant errors.
         *
-        * @param $fileName The local path to the file.
+        * @param $fileName string The local path to the file.
         * @return Status object
         */
        function verifyUpload( $fileName ) {
@@ -651,7 +651,7 @@ abstract class ImageHandler extends MediaHandler {
         * @param $height Integer: height (output only)
         * @param $srcWidth Integer: width of the source image
         * @param $srcHeight Integer: height of the source image
-        * @param $mimeType Unused
+        * @param $mimeType
         * @return bool to indicate that an error should be returned to the user.
         */
        function validateThumbParams( &$width, &$height, $srcWidth, $srcHeight, $mimeType ) {
index 224b4a2..0522dfc 100644 (file)
@@ -143,13 +143,17 @@ class JpegMetadataExtractor {
        /**
        * Helper function for jpegSegmentSplitter
        * @param &$fh FileHandle for jpeg file
-       * @return data content of segment.
+       * @return string data content of segment.
        */
        private static function jpegExtractMarker( &$fh ) {
                $size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
-               if ( $size['int'] <= 2 ) throw new MWException( "invalid marker size in jpeg" );
+               if ( $size['int'] <= 2 ) {
+                       throw new MWException( "invalid marker size in jpeg" );
+               }
                $segment = fread( $fh, $size['int'] - 2 );
-               if ( strlen( $segment ) !== $size['int'] - 2 ) throw new MWException( "Segment shorter than expected" );
+               if ( strlen( $segment ) !== $size['int'] - 2 ) {
+                       throw new MWException( "Segment shorter than expected" );
+               }
                return $segment;
        }
 
index 6b73be7..52387f7 100644 (file)
@@ -93,8 +93,8 @@ abstract class BagOStuff {
 
        /**
         * Delete all objects expiring before a certain date.
-        * @param $date The reference date in MW format
-        * @param $progressCallback Optional, a function which will be called 
+        * @param $date string The reference date in MW format
+        * @param $progressCallback callback|bool Optional, a function which will be called
         *     regularly during long-running operations with the percentage progress
         *     as the first parameter.
         *
index 80a6512..0b18c5a 100644 (file)
@@ -642,7 +642,7 @@ class Parser {
        /**
         * Accessor/mutator for the output type
         *
-        * @param $x New value or null to just get the current one
+        * @param $x int|null New value or null to just get the current one
         * @return Integer
         */
        function OutputType( $x = null ) {
@@ -670,8 +670,8 @@ class Parser {
        /**
         * Accessor/mutator for the ParserOptions object
         *
-        * @param $x New value or null to just get the current one
-        * @return Current ParserOptions object
+        * @param $x ParserOptions New value or null to just get the current one
+        * @return ParserOptions Current ParserOptions object
         */
        function Options( $x = null ) {
                return wfSetVar( $this->mOptions, $x );
@@ -2093,7 +2093,7 @@ class Parser {
         * element appropriate to the prefix character passed into them.
         * @private
         *
-        * @param $char char
+        * @param $char string
         *
         * @return string
         */
@@ -2998,11 +2998,11 @@ class Parser {
         *   'post-expand-template-inclusion' (corresponding messages:
         *       'post-expand-template-inclusion-warning',
         *       'post-expand-template-inclusion-category')
-        * @param $current Current value
-        * @param $max Maximum allowed, when an explicit limit has been
+        * @param $current int|null Current value
+        * @param $max int|null Maximum allowed, when an explicit limit has been
         *       exceeded, provide the values (optional)
         */
-       function limitationWarn( $limitationType, $current=null, $max=null) {
+       function limitationWarn( $limitationType, $current = null, $max = null) {
                # does no harm if $current and $max are present but are unnecessary for the message
                $warning = wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ), $current, $max );
                $this->mOutput->addWarning( $warning );
@@ -3527,7 +3527,7 @@ class Parser {
         * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
         * @param Title $title
         * @param Array $options Array of options to RepoGroup::findFile
-        * @return File|false
+        * @return File|bool
         */
        function fetchFile( $title, $options = array() ) {
                $res = $this->fetchFileAndTitle( $title, $options );
@@ -4572,11 +4572,13 @@ class Parser {
         *
         * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook>
         * @param $callback Mixed: the callback function (and object) to use for the tag
-        * @return The old value of the mTagHooks array associated with the hook
+        * @return Mixed|null The old value of the mTagHooks array associated with the hook
         */
        public function setHook( $tag, $callback ) {
                $tag = strtolower( $tag );
-               if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) throw new MWException( "Invalid character {$m[0]} in setHook('$tag', ...) call" );
+               if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) {
+                       throw new MWException( "Invalid character {$m[0]} in setHook('$tag', ...) call" );
+               }
                $oldVal = isset( $this->mTagHooks[$tag] ) ? $this->mTagHooks[$tag] : null;
                $this->mTagHooks[$tag] = $callback;
                if ( !in_array( $tag, $this->mStripList ) ) {
@@ -4600,11 +4602,13 @@ class Parser {
         *
         * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook>
         * @param $callback Mixed: the callback function (and object) to use for the tag
-        * @return The old value of the mTagHooks array associated with the hook
+        * @return Mixed|null The old value of the mTagHooks array associated with the hook
         */
        function setTransparentTagHook( $tag, $callback ) {
                $tag = strtolower( $tag );
-               if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) throw new MWException( "Invalid character {$m[0]} in setTransparentHook('$tag', ...) call" );
+               if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) {
+                       throw new MWException( "Invalid character {$m[0]} in setTransparentHook('$tag', ...) call" );
+               }
                $oldVal = isset( $this->mTransparentTagHooks[$tag] ) ? $this->mTransparentTagHooks[$tag] : null;
                $this->mTransparentTagHooks[$tag] = $callback;
 
@@ -5350,7 +5354,7 @@ class Parser {
         * section does not exist, $oldtext is returned unchanged.
         *
         * @param $oldtext String: former text of the article
-        * @param $section Numeric: section identifier
+        * @param $section int section identifier
         * @param $text String: replacing text
         * @return String: modified text
         */
@@ -5433,7 +5437,7 @@ class Parser {
        /**
         * Mutator for $mDefaultSort
         *
-        * @param $sort New value
+        * @param $sort string New value
         */
        public function setDefaultSort( $sort ) {
                $this->mDefaultSort = $sort;
@@ -5511,7 +5515,7 @@ class Parser {
         *
         * @param $text String: text string to be stripped of wikitext
         * for use in a Section anchor
-        * @return Filtered text string
+        * @return string Filtered text string
         */
        public function stripSectionName( $text ) {
                # Strip internal link markup
@@ -5650,7 +5654,7 @@ class Parser {
         * If the $data array has been stored persistently, the caller should first
         * check whether it is still valid, by calling isValidHalfParsedText().
         *
-        * @param $data Serialized data
+        * @param $data array Serialized data
         * @return String
         */
        function unserializeHalfParsedText( $data ) {
index 90e4494..244890f 100644 (file)
@@ -84,7 +84,7 @@ class Parser_LinkHooks extends Parser {
         * @param $flags Integer: a combination of the following flags:
         *     SLH_PATTERN   Use a regex link pattern rather than a namespace
         *
-        * @return The old callback function for this name, if any
+        * @return callback|null The old callback function for this name, if any
         */
        public function setLinkHook( $ns, $callback, $flags = 0 ) {
                if( $flags & SLH_PATTERN && !is_string($ns) )
index 2b98f01..8bd80b2 100644 (file)
@@ -143,7 +143,7 @@ class MWTidy {
         *
         * @param $text String: HTML to check
         * @param $stderr Boolean: Whether to read result from STDERR rather than STDOUT
-        * @param &$retval Exit code (-1 on internal error)
+        * @param &$retval int Exit code (-1 on internal error)
         * @return mixed String or null
         */
        private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
@@ -207,7 +207,7 @@ class MWTidy {
         *
         * @param $text String: HTML to check
         * @param $stderr Boolean: Whether to read result from error status instead of output
-        * @param &$retval Exit code (-1 on internal error)
+        * @param &$retval int Exit code (-1 on internal error)
         * @return mixed String or null
         */
        private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {
index 0fe18c2..3d1a017 100644 (file)
@@ -213,7 +213,7 @@ class Profiler {
        /**
         * Recursive function the format the current profiling array into a tree
         *
-        * @param $stack profiling array
+        * @param $stack array profiling array
         */
        function remapCallTree( $stack ) {
                if( count( $stack ) < 2 ){
index 55fbddc..d9ec7eb 100644 (file)
@@ -215,7 +215,7 @@ class ResourceLoader {
         * Registers a module with the ResourceLoader system.
         *
         * @param $name Mixed: Name of module as a string or List of name/object pairs as an array
-        * @param $info Module info array. For backwards compatibility with 1.17alpha,
+        * @param $info array Module info array. For backwards compatibility with 1.17alpha,
         *   this may also be a ResourceLoaderModule object. Optional when using
         *   multiple-registration calling style.
         * @throws MWException: If a duplicate module registration is attempted
@@ -795,7 +795,7 @@ class ResourceLoader {
         * Returns JS code to call to mw.loader.implement for a module with
         * given properties.
         *
-        * @param $name Module name
+        * @param $name string Module name
         * @param $scripts Mixed: List of URLs to JavaScript files or String of JavaScript code
         * @param $styles Mixed: List of CSS strings keyed by media type, or list of lists of URLs to
         * CSS files keyed by media type
index aeacbad..7ff292b 100644 (file)
@@ -771,7 +771,7 @@ class SearchResult {
        }
 
        /**
-        * @return Double|null if not supported
+        * @return float|null if not supported
         */
        function getScore() {
                return null;
index af8f387..a74d215 100644 (file)
@@ -290,7 +290,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Get the base part of the search query.
         *
-        * @param &$query Search query array
+        * @param &$query array Search query array
         * @param $filteredTerm String
         * @param $fulltext Boolean
         * @since 1.18 (changed)
index 48ca4f0..68f6fa1 100644 (file)
@@ -46,7 +46,7 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Show the special page
         *
-        * @param $isbn ISBN passed as a subpage parameter
+        * @param $isbn string ISBN passed as a subpage parameter
         */
        public function execute( $isbn ) {
                $this->setHeaders();
@@ -63,7 +63,7 @@ class SpecialBookSources extends SpecialPage {
 
        /**
         * Returns whether a given ISBN (10 or 13) is valid.  True indicates validity.
-        * @param isbn ISBN passed for check
+        * @param isbn string ISBN passed for check
         */
        public static function isValidISBN( $isbn ) {
                $isbn = self::cleanIsbn( $isbn );
@@ -100,7 +100,7 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Trim ISBN and remove characters which aren't required
         *
-        * @param $isbn Unclean ISBN
+        * @param $isbn string Unclean ISBN
         * @return string
         */
        private static function cleanIsbn( $isbn ) {
@@ -160,8 +160,8 @@ class SpecialBookSources extends SpecialPage {
        /**
         * Format a book source list item
         *
-        * @param $label Book source label
-        * @param $url Book source URL
+        * @param $label string Book source label
+        * @param $url string Book source URL
         * @return string
         */
        private function makeListItem( $label, $url ) {
index 912f773..3e9ce12 100644 (file)
@@ -110,7 +110,7 @@ class EmailConfirmation extends UnlistedSpecialPage {
         * Attempt to confirm the user's email address and show success or failure
         * as needed; if successful, take the user to log in
         *
-        * @param $code Confirmation code
+        * @param $code string Confirmation code
         */
        function attemptConfirm( $code ) {
                $user = User::newFromConfirmationCode( $code );
@@ -156,7 +156,7 @@ class EmailInvalidation extends UnlistedSpecialPage {
         * Attempt to invalidate the user's email address and show success or failure
         * as needed; if successful, link to main page
         *
-        * @param $code Confirmation code
+        * @param $code string Confirmation code
         */
        function attemptInvalidate( $code ) {
                $user = User::newFromConfirmationCode( $code );
index 34bdd3e..7efa2b7 100644 (file)
@@ -520,7 +520,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * Build a set of links for convenient navigation
         * between watchlist viewing and editing modes
         *
-        * @param $unused Unused
+        * @param $unused
         * @return string
         */
        public static function buildTools( $unused ) {
index 760a463..a829029 100644 (file)
@@ -1264,7 +1264,7 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param $rev Revision
         * @param $titleObj Title
-        * @param $ts Timestamp
+        * @param $ts string Timestamp
         * @return string
         */
        function getPageLink( $rev, $titleObj, $ts ) {
@@ -1295,7 +1295,7 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param $file File
         * @param $titleObj Title
-        * @param $ts A timestamp
+        * @param $ts string A timestamp
         * @param $key String: a storage key
         *
         * @return String: HTML fragment
index 32eeeb3..b89c9dc 100644 (file)
@@ -203,7 +203,7 @@ abstract class UploadBase {
 
        /**
         * @param $srcPath String: the source path
-        * @return the real path if it was a virtual URL
+        * @return stringthe real path if it was a virtual URL
         */
        function getRealPath( $srcPath ) {
                $repo = RepoGroup::singleton()->getLocalRepo();
index ec83f7d..24c07a8 100644 (file)
@@ -128,7 +128,7 @@ class UploadFromChunks extends UploadFromFile {
 
        /**
         * Returns the virtual chunk location:  
-        * @param unknown_type $index
+        * @param $index
         */
        function getVirtualChunkLocation( $index ){
                return $this->repo->getVirtualUrl( 'temp' ) . 
@@ -138,12 +138,13 @@ class UploadFromChunks extends UploadFromFile {
                                ) . 
                                $this->getChunkFileKey( $index );
        }
+
        /**
         * Add a chunk to the temporary directory
         *
-        * @param $chunkPath path to temporary chunk file
-        * @param $chunkSize size of the current chunk
-        * @param $offset offset of current chunk ( mutch match database chunk offset ) 
+        * @param $chunkPath string path to temporary chunk file
+        * @param $chunkSize int size of the current chunk
+        * @param $offset int offset of current chunk ( mutch match database chunk offset )
         * @return Status
         */
        public function addChunk( $chunkPath, $chunkSize, $offset ) {
index f7589bd..8805c50 100644 (file)
@@ -140,7 +140,7 @@ class UploadFromStash extends UploadBase {
 
        /**
         * Remove a temporarily kept file stashed by saveTempUploadedFile().
-        * @return success
+        * @return bool success
         */
        public function unsaveUploadedFile() {
                return $this->stash->removeFile( $this->mFileKey );