r111072 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111071‎ | r111072 | r111073 >
Date:19:29, 9 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar

Other documentation improvements
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LocalisationCache.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/SiteConfiguration.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/WebRequest.php (modified) (history)
  • /trunk/phase3/includes/WikiPage.php (modified) (history)
  • /trunk/phase3/includes/Xml.php (modified) (history)
  • /trunk/phase3/includes/ZipDirectoryReader.php (modified) (history)
  • /trunk/phase3/includes/logging/LogFormatter.php (modified) (history)
  • /trunk/phase3/includes/logging/LogPage.php (modified) (history)
  • /trunk/phase3/includes/media/BitmapMetadataHandler.php (modified) (history)
  • /trunk/phase3/includes/media/FormatMetadata.php (modified) (history)
  • /trunk/phase3/includes/media/Generic.php (modified) (history)
  • /trunk/phase3/includes/media/JpegMetadataExtractor.php (modified) (history)
  • /trunk/phase3/includes/objectcache/BagOStuff.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser_LinkHooks.php (modified) (history)
  • /trunk/phase3/includes/parser/Tidy.php (modified) (history)
  • /trunk/phase3/includes/profiler/Profiler.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)
  • /trunk/phase3/includes/search/SearchMySQL.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBooksources.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialConfirmemail.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialEditWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromChunks.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromStash.php
@@ -140,7 +140,7 @@
141141
142142 /**
143143 * Remove a temporarily kept file stashed by saveTempUploadedFile().
144 - * @return success
 144+ * @return bool success
145145 */
146146 public function unsaveUploadedFile() {
147147 return $this->stash->removeFile( $this->mFileKey );
Index: trunk/phase3/includes/upload/UploadBase.php
@@ -203,7 +203,7 @@
204204
205205 /**
206206 * @param $srcPath String: the source path
207 - * @return the real path if it was a virtual URL
 207+ * @return stringthe real path if it was a virtual URL
208208 */
209209 function getRealPath( $srcPath ) {
210210 $repo = RepoGroup::singleton()->getLocalRepo();
Index: trunk/phase3/includes/upload/UploadFromChunks.php
@@ -128,7 +128,7 @@
129129
130130 /**
131131 * Returns the virtual chunk location:
132 - * @param unknown_type $index
 132+ * @param $index
133133 */
134134 function getVirtualChunkLocation( $index ){
135135 return $this->repo->getVirtualUrl( 'temp' ) .
@@ -138,12 +138,13 @@
139139 ) .
140140 $this->getChunkFileKey( $index );
141141 }
 142+
142143 /**
143144 * Add a chunk to the temporary directory
144145 *
145 - * @param $chunkPath path to temporary chunk file
146 - * @param $chunkSize size of the current chunk
147 - * @param $offset offset of current chunk ( mutch match database chunk offset )
 146+ * @param $chunkPath string path to temporary chunk file
 147+ * @param $chunkSize int size of the current chunk
 148+ * @param $offset int offset of current chunk ( mutch match database chunk offset )
148149 * @return Status
149150 */
150151 public function addChunk( $chunkPath, $chunkSize, $offset ) {
Index: trunk/phase3/includes/Xml.php
@@ -529,8 +529,8 @@
530530 /**
531531 * Shortcut for creating fieldsets.
532532 *
533 - * @param $legend Legend of the fieldset. If evaluates to false, legend is not added.
534 - * @param $content Pre-escaped content for the fieldset. If false, only open fieldset is returned.
 533+ * @param $legend string|bool Legend of the fieldset. If evaluates to false, legend is not added.
 534+ * @param $content string Pre-escaped content for the fieldset. If false, only open fieldset is returned.
535535 * @param $attribs array Any attributes to fieldset-element.
536536 *
537537 * @return string
Index: trunk/phase3/includes/search/SearchEngine.php
@@ -771,7 +771,7 @@
772772 }
773773
774774 /**
775 - * @return Double|null if not supported
 775+ * @return float|null if not supported
776776 */
777777 function getScore() {
778778 return null;
Index: trunk/phase3/includes/search/SearchMySQL.php
@@ -290,7 +290,7 @@
291291 /**
292292 * Get the base part of the search query.
293293 *
294 - * @param &$query Search query array
 294+ * @param &$query array Search query array
295295 * @param $filteredTerm String
296296 * @param $fulltext Boolean
297297 * @since 1.18 (changed)
Index: trunk/phase3/includes/objectcache/BagOStuff.php
@@ -93,8 +93,8 @@
9494
9595 /**
9696 * Delete all objects expiring before a certain date.
97 - * @param $date The reference date in MW format
98 - * @param $progressCallback Optional, a function which will be called
 97+ * @param $date string The reference date in MW format
 98+ * @param $progressCallback callback|bool Optional, a function which will be called
9999 * regularly during long-running operations with the percentage progress
100100 * as the first parameter.
101101 *
Index: trunk/phase3/includes/LocalisationCache.php
@@ -793,8 +793,8 @@
794794 interface LCStore {
795795 /**
796796 * Get a value.
797 - * @param $code Language code
798 - * @param $key Cache key
 797+ * @param $code string Language code
 798+ * @param $key string Cache key
799799 */
800800 function get( $code, $key );
801801
@@ -1164,4 +1164,4 @@
11651165 $this->unload( $code );
11661166 }
11671167 }
1168 -}
\ No newline at end of file
 1168+}
Index: trunk/phase3/includes/parser/Parser.php
@@ -642,7 +642,7 @@
643643 /**
644644 * Accessor/mutator for the output type
645645 *
646 - * @param $x New value or null to just get the current one
 646+ * @param $x int|null New value or null to just get the current one
647647 * @return Integer
648648 */
649649 function OutputType( $x = null ) {
@@ -670,8 +670,8 @@
671671 /**
672672 * Accessor/mutator for the ParserOptions object
673673 *
674 - * @param $x New value or null to just get the current one
675 - * @return Current ParserOptions object
 674+ * @param $x ParserOptions New value or null to just get the current one
 675+ * @return ParserOptions Current ParserOptions object
676676 */
677677 function Options( $x = null ) {
678678 return wfSetVar( $this->mOptions, $x );
@@ -2093,7 +2093,7 @@
20942094 * element appropriate to the prefix character passed into them.
20952095 * @private
20962096 *
2097 - * @param $char char
 2097+ * @param $char string
20982098 *
20992099 * @return string
21002100 */
@@ -2998,11 +2998,11 @@
29992999 * 'post-expand-template-inclusion' (corresponding messages:
30003000 * 'post-expand-template-inclusion-warning',
30013001 * 'post-expand-template-inclusion-category')
3002 - * @param $current Current value
3003 - * @param $max Maximum allowed, when an explicit limit has been
 3002+ * @param $current int|null Current value
 3003+ * @param $max int|null Maximum allowed, when an explicit limit has been
30043004 * exceeded, provide the values (optional)
30053005 */
3006 - function limitationWarn( $limitationType, $current=null, $max=null) {
 3006+ function limitationWarn( $limitationType, $current = null, $max = null) {
30073007 # does no harm if $current and $max are present but are unnecessary for the message
30083008 $warning = wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ), $current, $max );
30093009 $this->mOutput->addWarning( $warning );
@@ -3527,7 +3527,7 @@
35283528 * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
35293529 * @param Title $title
35303530 * @param Array $options Array of options to RepoGroup::findFile
3531 - * @return File|false
 3531+ * @return File|bool
35323532 */
35333533 function fetchFile( $title, $options = array() ) {
35343534 $res = $this->fetchFileAndTitle( $title, $options );
@@ -4572,11 +4572,13 @@
45734573 *
45744574 * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook>
45754575 * @param $callback Mixed: the callback function (and object) to use for the tag
4576 - * @return The old value of the mTagHooks array associated with the hook
 4576+ * @return Mixed|null The old value of the mTagHooks array associated with the hook
45774577 */
45784578 public function setHook( $tag, $callback ) {
45794579 $tag = strtolower( $tag );
4580 - if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) throw new MWException( "Invalid character {$m[0]} in setHook('$tag', ...) call" );
 4580+ if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) {
 4581+ throw new MWException( "Invalid character {$m[0]} in setHook('$tag', ...) call" );
 4582+ }
45814583 $oldVal = isset( $this->mTagHooks[$tag] ) ? $this->mTagHooks[$tag] : null;
45824584 $this->mTagHooks[$tag] = $callback;
45834585 if ( !in_array( $tag, $this->mStripList ) ) {
@@ -4600,11 +4602,13 @@
46014603 *
46024604 * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook>
46034605 * @param $callback Mixed: the callback function (and object) to use for the tag
4604 - * @return The old value of the mTagHooks array associated with the hook
 4606+ * @return Mixed|null The old value of the mTagHooks array associated with the hook
46054607 */
46064608 function setTransparentTagHook( $tag, $callback ) {
46074609 $tag = strtolower( $tag );
4608 - if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) throw new MWException( "Invalid character {$m[0]} in setTransparentHook('$tag', ...) call" );
 4610+ if ( preg_match( '/[<>\r\n]/', $tag, $m ) ) {
 4611+ throw new MWException( "Invalid character {$m[0]} in setTransparentHook('$tag', ...) call" );
 4612+ }
46094613 $oldVal = isset( $this->mTransparentTagHooks[$tag] ) ? $this->mTransparentTagHooks[$tag] : null;
46104614 $this->mTransparentTagHooks[$tag] = $callback;
46114615
@@ -5350,7 +5354,7 @@
53515355 * section does not exist, $oldtext is returned unchanged.
53525356 *
53535357 * @param $oldtext String: former text of the article
5354 - * @param $section Numeric: section identifier
 5358+ * @param $section int section identifier
53555359 * @param $text String: replacing text
53565360 * @return String: modified text
53575361 */
@@ -5433,7 +5437,7 @@
54345438 /**
54355439 * Mutator for $mDefaultSort
54365440 *
5437 - * @param $sort New value
 5441+ * @param $sort string New value
54385442 */
54395443 public function setDefaultSort( $sort ) {
54405444 $this->mDefaultSort = $sort;
@@ -5511,7 +5515,7 @@
55125516 *
55135517 * @param $text String: text string to be stripped of wikitext
55145518 * for use in a Section anchor
5515 - * @return Filtered text string
 5519+ * @return string Filtered text string
55165520 */
55175521 public function stripSectionName( $text ) {
55185522 # Strip internal link markup
@@ -5650,7 +5654,7 @@
56515655 * If the $data array has been stored persistently, the caller should first
56525656 * check whether it is still valid, by calling isValidHalfParsedText().
56535657 *
5654 - * @param $data Serialized data
 5658+ * @param $data array Serialized data
56555659 * @return String
56565660 */
56575661 function unserializeHalfParsedText( $data ) {
Index: trunk/phase3/includes/parser/Tidy.php
@@ -143,7 +143,7 @@
144144 *
145145 * @param $text String: HTML to check
146146 * @param $stderr Boolean: Whether to read result from STDERR rather than STDOUT
147 - * @param &$retval Exit code (-1 on internal error)
 147+ * @param &$retval int Exit code (-1 on internal error)
148148 * @return mixed String or null
149149 */
150150 private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
@@ -207,7 +207,7 @@
208208 *
209209 * @param $text String: HTML to check
210210 * @param $stderr Boolean: Whether to read result from error status instead of output
211 - * @param &$retval Exit code (-1 on internal error)
 211+ * @param &$retval int Exit code (-1 on internal error)
212212 * @return mixed String or null
213213 */
214214 private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {
Index: trunk/phase3/includes/parser/Parser_LinkHooks.php
@@ -84,7 +84,7 @@
8585 * @param $flags Integer: a combination of the following flags:
8686 * SLH_PATTERN Use a regex link pattern rather than a namespace
8787 *
88 - * @return The old callback function for this name, if any
 88+ * @return callback|null The old callback function for this name, if any
8989 */
9090 public function setLinkHook( $ns, $callback, $flags = 0 ) {
9191 if( $flags & SLH_PATTERN && !is_string($ns) )
Index: trunk/phase3/includes/Linker.php
@@ -609,8 +609,9 @@
610610 /**
611611 * Get the link parameters for MediaTransformOutput::toHtml() from given
612612 * frame parameters supplied by the Parser.
613 - * @param $frameParams The frame parameters
614 - * @param $query An optional query string to add to description page links
 613+ * @param $frameParams array The frame parameters
 614+ * @param $query string An optional query string to add to description page links
 615+ * @return array
615616 */
616617 private static function getImageLinkMTOParams( $frameParams, $query = '' ) {
617618 $mtoParams = array();
@@ -1126,7 +1127,7 @@
11271128 * Called by Linker::formatComment.
11281129 *
11291130 * @param $comment String: comment text
1130 - * @param $title An optional title object used to links to sections
 1131+ * @param $title Title|null An optional title object used to links to sections
11311132 * @param $local Boolean: whether section links should refer to local page
11321133 * @return String: formatted comment
11331134 */
@@ -1205,7 +1206,7 @@
12061207 *
12071208 * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
12081209 * @param $comment String: text to format links in
1209 - * @param $title An optional title object used to links to sections
 1210+ * @param $title Title|null An optional title object used to links to sections
12101211 * @param $local Boolean: whether section links should refer to local page
12111212 * @return String
12121213 */
@@ -1498,7 +1499,7 @@
14991500 * Generate a table of contents from a section tree
15001501 * Currently unused.
15011502 *
1502 - * @param $tree Return value of ParserOutput::getSections()
 1503+ * @param $tree array Return value of ParserOutput::getSections()
15031504 * @return String: HTML fragment
15041505 */
15051506 public static function generateTOC( $tree ) {
@@ -1708,7 +1709,7 @@
17091710 * Format a size in bytes for output, using an appropriate
17101711 * unit (B, KB, MB or GB) according to the magnitude in question
17111712 *
1712 - * @param $size Size to format
 1713+ * @param $size int Size to format
17131714 * @return String
17141715 */
17151716 public static function formatSize( $size ) {
@@ -1944,7 +1945,7 @@
19451946 * @param $prefix String: text before link text
19461947 * @param $aprops String: extra attributes to the a-element
19471948 * @param $style String: style to apply - if empty, use getInternalLinkAttributesObj instead
1948 - * @return the a-element
 1949+ * @return string the a-element
19491950 */
19501951 static function makeKnownLinkObj(
19511952 $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
Index: trunk/phase3/includes/profiler/Profiler.php
@@ -213,7 +213,7 @@
214214 /**
215215 * Recursive function the format the current profiling array into a tree
216216 *
217 - * @param $stack profiling array
 217+ * @param $stack array profiling array
218218 */
219219 function remapCallTree( $stack ) {
220220 if( count( $stack ) < 2 ){
Index: trunk/phase3/includes/OutputPage.php
@@ -1309,7 +1309,7 @@
13101310 /**
13111311 * Get/set the ParserOptions object to use for wikitext parsing
13121312 *
1313 - * @param $options either the ParserOption to use or null to only get the
 1313+ * @param $options ParserOptions|null either the ParserOption to use or null to only get the
13141314 * current ParserOption object
13151315 * @return ParserOptions object
13161316 */
@@ -2344,7 +2344,7 @@
23452345 * Add a "return to" link pointing to a specified title,
23462346 * or the title indicated in the request, or else the main page
23472347 *
2348 - * @param $unused No longer used
 2348+ * @param $unused
23492349 * @param $returnto Title or String to return to
23502350 * @param $returntoquery String: query string for the return to link
23512351 */
@@ -2932,7 +2932,7 @@
29332933 }
29342934
29352935 /**
2936 - * @param $unused Unused
 2936+ * @param $unused
29372937 * @param $addContentType bool
29382938 *
29392939 * @return string HTML tag links to be put in the header.
Index: trunk/phase3/includes/logging/LogPage.php
@@ -522,7 +522,7 @@
523523 * Convert a comma-delimited list of block log flags
524524 * into a more readable (and translated) form
525525 *
526 - * @param $flags Flags to format
 526+ * @param $flags string Flags to format
527527 * @param $lang Language object to use
528528 * @return String
529529 */
Index: trunk/phase3/includes/logging/LogFormatter.php
@@ -165,7 +165,7 @@
166166 * Returns a sentence describing the log action. Usually
167167 * a Message object is returned, but old style log types
168168 * and entries might return pre-escaped html string.
169 - * @return Message|pre-escaped html
 169+ * @return Message|string pre-escaped html
170170 */
171171 protected function getActionMessage() {
172172 $message = $this->msg( $this->getMessageKey() );
Index: trunk/phase3/includes/WebRequest.php
@@ -298,8 +298,8 @@
299299 /**
300300 * Recursively normalizes UTF-8 strings in the given array.
301301 *
302 - * @param $data string or array
303 - * @return cleaned-up version of the given
 302+ * @param $data string|array
 303+ * @return array|string cleaned-up version of the given
304304 * @private
305305 */
306306 function normalizeUnicode( $data ) {
Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -215,7 +215,7 @@
216216 * Registers a module with the ResourceLoader system.
217217 *
218218 * @param $name Mixed: Name of module as a string or List of name/object pairs as an array
219 - * @param $info Module info array. For backwards compatibility with 1.17alpha,
 219+ * @param $info array Module info array. For backwards compatibility with 1.17alpha,
220220 * this may also be a ResourceLoaderModule object. Optional when using
221221 * multiple-registration calling style.
222222 * @throws MWException: If a duplicate module registration is attempted
@@ -795,7 +795,7 @@
796796 * Returns JS code to call to mw.loader.implement for a module with
797797 * given properties.
798798 *
799 - * @param $name Module name
 799+ * @param $name string Module name
800800 * @param $scripts Mixed: List of URLs to JavaScript files or String of JavaScript code
801801 * @param $styles Mixed: List of CSS strings keyed by media type, or list of lists of URLs to
802802 * CSS files keyed by media type
Index: trunk/phase3/includes/media/FormatMetadata.php
@@ -1021,7 +1021,7 @@
10221022 * @private
10231023 *
10241024 * @param $num Mixed: the value to format
1025 - * @param $round digits to round to or false.
 1025+ * @param $round float|int digits to round to or false.
10261026 * @return mixed A floating point number or whatever we were fed
10271027 */
10281028 static function formatNum( $num, $round = false ) {
@@ -1102,7 +1102,8 @@
11031103 return $a;
11041104 }
11051105
1106 - /** Fetch the human readable version of a news code.
 1106+ /**
 1107+ * Fetch the human readable version of a news code.
11071108 * A news code is an 8 digit code. The first two
11081109 * digits are a general classification, so we just
11091110 * translate that.
@@ -1111,7 +1112,7 @@
11121113 * a string, not an int.
11131114 *
11141115 * @param $val String: The 8 digit news code.
1115 - * @return The human readable form
 1116+ * @return srting The human readable form
11161117 */
11171118 static private function convertNewsCode( $val ) {
11181119 if ( !preg_match( '/^\d{8}$/D', $val ) ) {
Index: trunk/phase3/includes/media/BitmapMetadataHandler.php
@@ -122,7 +122,7 @@
123123 /** Main entry point for jpeg's.
124124 *
125125 * @param $filename string filename (with full path)
126 - * @return metadata result array.
 126+ * @return array metadata result array.
127127 * @throws MWException on invalid file.
128128 */
129129 static function Jpeg ( $filename ) {
Index: trunk/phase3/includes/media/Generic.php
@@ -471,7 +471,7 @@
472472 * match the handler class, a Status object should be returned containing
473473 * relevant errors.
474474 *
475 - * @param $fileName The local path to the file.
 475+ * @param $fileName string The local path to the file.
476476 * @return Status object
477477 */
478478 function verifyUpload( $fileName ) {
@@ -651,7 +651,7 @@
652652 * @param $height Integer: height (output only)
653653 * @param $srcWidth Integer: width of the source image
654654 * @param $srcHeight Integer: height of the source image
655 - * @param $mimeType Unused
 655+ * @param $mimeType
656656 * @return bool to indicate that an error should be returned to the user.
657657 */
658658 function validateThumbParams( &$width, &$height, $srcWidth, $srcHeight, $mimeType ) {
Index: trunk/phase3/includes/media/JpegMetadataExtractor.php
@@ -143,13 +143,17 @@
144144 /**
145145 * Helper function for jpegSegmentSplitter
146146 * @param &$fh FileHandle for jpeg file
147 - * @return data content of segment.
 147+ * @return string data content of segment.
148148 */
149149 private static function jpegExtractMarker( &$fh ) {
150150 $size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
151 - if ( $size['int'] <= 2 ) throw new MWException( "invalid marker size in jpeg" );
 151+ if ( $size['int'] <= 2 ) {
 152+ throw new MWException( "invalid marker size in jpeg" );
 153+ }
152154 $segment = fread( $fh, $size['int'] - 2 );
153 - if ( strlen( $segment ) !== $size['int'] - 2 ) throw new MWException( "Segment shorter than expected" );
 155+ if ( strlen( $segment ) !== $size['int'] - 2 ) {
 156+ throw new MWException( "Segment shorter than expected" );
 157+ }
154158 return $segment;
155159 }
156160
Index: trunk/phase3/includes/Title.php
@@ -1284,7 +1284,7 @@
12851285 * with action=render, $wgServer is prepended.
12861286 *
12871287
1288 - * @param $query \twotypes{\string,\array} an optional query string,
 1288+ * @param $query string|array an optional query string,
12891289 * not used for interwiki links. Can be specified as an associative array as well,
12901290 * e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
12911291 * Some query patterns will trigger various shorturl path replacements.
Index: trunk/phase3/includes/WikiPage.php
@@ -1023,7 +1023,7 @@
10241024 * @param $dbw DatabaseBase
10251025 * @param $redirectTitle Title object pointing to the redirect target,
10261026 * or NULL if this is not a redirect
1027 - * @param $lastRevIsRedirect If given, will optimize adding and
 1027+ * @param $lastRevIsRedirect null|bool If given, will optimize adding and
10281028 * removing rows in redirect table.
10291029 * @return bool true on success, false on failure
10301030 * @private
@@ -1124,7 +1124,7 @@
11251125 }
11261126
11271127 /**
1128 - * @param $section empty/null/false or a section number (0, 1, 2, T1, T2...)
 1128+ * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...)
11291129 * @param $text String: new text of the section
11301130 * @param $sectionTitle String: new section's subject, only if $section is 'new'
11311131 * @param $edittime String: revision timestamp or null to use the current revision
@@ -1223,7 +1223,7 @@
12241224 * edit-already-exists error will be returned. These two conditions are also possible with
12251225 * auto-detection due to MediaWiki's performance-optimised locking strategy.
12261226 *
1227 - * @param $baseRevId the revision ID this edit was based off, if any
 1227+ * @param $baseRevId int the revision ID this edit was based off, if any
12281228 * @param $user User the user doing the edit
12291229 *
12301230 * @return Status object. Possible errors:
@@ -1917,7 +1917,7 @@
19181918 * Deletes the article with database consistency, writes logs, purges caches
19191919 *
19201920 * @param $reason string delete reason for deletion log
1921 - * @param $suppress bitfield
 1921+ * @param $suppress int bitfield
19221922 * Revision::DELETED_TEXT
19231923 * Revision::DELETED_COMMENT
19241924 * Revision::DELETED_USER
@@ -1940,7 +1940,7 @@
19411941 * Deletes the article with database consistency, writes logs, purges caches
19421942 *
19431943 * @param $reason string delete reason for deletion log
1944 - * @param $suppress bitfield
 1944+ * @param $suppress int bitfield
19451945 * Revision::DELETED_TEXT
19461946 * Revision::DELETED_COMMENT
19471947 * Revision::DELETED_USER
@@ -2829,7 +2829,7 @@
28302830 private $text;
28312831
28322832 /**
2833 - * @var ParserOutput|false
 2833+ * @var ParserOutput|bool
28342834 */
28352835 private $parserOutput = false;
28362836
@@ -2839,7 +2839,7 @@
28402840 private $isDirty = false;
28412841
28422842 /**
2843 - * @var Status|false
 2843+ * @var Status|bool
28442844 */
28452845 private $error = false;
28462846
@@ -2883,7 +2883,7 @@
28842884 /**
28852885 * Get a Status object in case of error or false otherwise
28862886 *
2887 - * @return Status|false
 2887+ * @return Status|bool
28882888 */
28892889 public function getError() {
28902890 return $this->error;
Index: trunk/phase3/includes/ZipDirectoryReader.php
@@ -297,7 +297,7 @@
298298 * Find the location of the central directory, as would be seen by a
299299 * ZIP64-compliant reader.
300300 *
301 - * @return List containing offset, size and end position.
 301+ * @return array List containing offset, size and end position.
302302 */
303303 function findZip64CentralDirectory() {
304304 // The spec is ambiguous about the exact rules of precedence between the
@@ -473,8 +473,8 @@
474474 * Get the file contents from a given offset. If there are not enough bytes
475475 * in the file to satisfy the request, an exception will be thrown.
476476 *
477 - * @param $start The byte offset of the start of the block.
478 - * @param $length The number of bytes to return. If omitted, the remainder
 477+ * @param $start int The byte offset of the start of the block.
 478+ * @param $length int The number of bytes to return. If omitted, the remainder
479479 * of the file will be returned.
480480 *
481481 * @return string
@@ -560,9 +560,9 @@
561561 * Unpack a binary structure. This is like the built-in unpack() function
562562 * except nicer.
563563 *
564 - * @param $string The binary data input
 564+ * @param $string string The binary data input
565565 *
566 - * @param $struct An associative array giving structure members and their
 566+ * @param $struct array An associative array giving structure members and their
567567 * types. In the key is the field name. The value may be either an
568568 * integer, in which case the field is a little-endian unsigned integer
569569 * encoded in the given number of bytes, or an array, in which case the
@@ -571,9 +571,9 @@
572572 * - "string": The second array element gives the length of string.
573573 * Not null terminated.
574574 *
575 - * @param $offset The offset into the string at which to start unpacking.
 575+ * @param $offset int The offset into the string at which to start unpacking.
576576 *
577 - * @return Unpacked associative array. Note that large integers in the input
 577+ * @return array Unpacked associative array. Note that large integers in the input
578578 * may be represented as floating point numbers in the return value, so
579579 * the use of weak comparison is advised.
580580 */
@@ -628,7 +628,8 @@
629629 * boolean.
630630 *
631631 * @param $value integer
632 - * @param $bitIndex The index of the bit, where 0 is the LSB.
 632+ * @param $bitIndex int The index of the bit, where 0 is the LSB.
 633+ * @return bool
633634 */
634635 function testBit( $value, $bitIndex ) {
635636 return (bool)( ( $value >> $bitIndex ) & 1 );
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -1264,7 +1264,7 @@
12651265 *
12661266 * @param $rev Revision
12671267 * @param $titleObj Title
1268 - * @param $ts Timestamp
 1268+ * @param $ts string Timestamp
12691269 * @return string
12701270 */
12711271 function getPageLink( $rev, $titleObj, $ts ) {
@@ -1295,7 +1295,7 @@
12961296 *
12971297 * @param $file File
12981298 * @param $titleObj Title
1299 - * @param $ts A timestamp
 1299+ * @param $ts string A timestamp
13001300 * @param $key String: a storage key
13011301 *
13021302 * @return String: HTML fragment
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php
@@ -520,7 +520,7 @@
521521 * Build a set of links for convenient navigation
522522 * between watchlist viewing and editing modes
523523 *
524 - * @param $unused Unused
 524+ * @param $unused
525525 * @return string
526526 */
527527 public static function buildTools( $unused ) {
Index: trunk/phase3/includes/specials/SpecialBooksources.php
@@ -46,7 +46,7 @@
4747 /**
4848 * Show the special page
4949 *
50 - * @param $isbn ISBN passed as a subpage parameter
 50+ * @param $isbn string ISBN passed as a subpage parameter
5151 */
5252 public function execute( $isbn ) {
5353 $this->setHeaders();
@@ -63,7 +63,7 @@
6464
6565 /**
6666 * Returns whether a given ISBN (10 or 13) is valid. True indicates validity.
67 - * @param isbn ISBN passed for check
 67+ * @param isbn string ISBN passed for check
6868 */
6969 public static function isValidISBN( $isbn ) {
7070 $isbn = self::cleanIsbn( $isbn );
@@ -100,7 +100,7 @@
101101 /**
102102 * Trim ISBN and remove characters which aren't required
103103 *
104 - * @param $isbn Unclean ISBN
 104+ * @param $isbn string Unclean ISBN
105105 * @return string
106106 */
107107 private static function cleanIsbn( $isbn ) {
@@ -160,8 +160,8 @@
161161 /**
162162 * Format a book source list item
163163 *
164 - * @param $label Book source label
165 - * @param $url Book source URL
 164+ * @param $label string Book source label
 165+ * @param $url string Book source URL
166166 * @return string
167167 */
168168 private function makeListItem( $label, $url ) {
Index: trunk/phase3/includes/specials/SpecialConfirmemail.php
@@ -110,7 +110,7 @@
111111 * Attempt to confirm the user's email address and show success or failure
112112 * as needed; if successful, take the user to log in
113113 *
114 - * @param $code Confirmation code
 114+ * @param $code string Confirmation code
115115 */
116116 function attemptConfirm( $code ) {
117117 $user = User::newFromConfirmationCode( $code );
@@ -156,7 +156,7 @@
157157 * Attempt to invalidate the user's email address and show success or failure
158158 * as needed; if successful, link to main page
159159 *
160 - * @param $code Confirmation code
 160+ * @param $code string Confirmation code
161161 */
162162 function attemptInvalidate( $code ) {
163163 $user = User::newFromConfirmationCode( $code );
Index: trunk/phase3/includes/SiteConfiguration.php
@@ -210,7 +210,7 @@
211211 * @param $setting String ID of the setting name to retrieve
212212 * @param $wiki String Wiki ID of the wiki in question.
213213 * @param $suffix String The suffix of the wiki in question.
214 - * @param $var Reference The variable to insert the value into.
 214+ * @param $var array Reference The variable to insert the value into.
215215 * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data.
216216 * @param $wikiTags Array The tags assigned to the wiki.
217217 */
Index: trunk/phase3/includes/Skin.php
@@ -317,7 +317,7 @@
318318 * Make a <script> tag containing global variables
319319 *
320320 * @deprecated in 1.19
321 - * @param $unused Unused
 321+ * @param $unused
322322 * @return string HTML fragment
323323 */
324324 public static function makeGlobalVariablesScript( $unused ) {

Status & tagging log