Index: trunk/phase3/includes/upload/UploadFromStash.php |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | |
142 | 142 | /** |
143 | 143 | * Remove a temporarily kept file stashed by saveTempUploadedFile(). |
144 | | - * @return success |
| 144 | + * @return bool success |
145 | 145 | */ |
146 | 146 | public function unsaveUploadedFile() { |
147 | 147 | return $this->stash->removeFile( $this->mFileKey ); |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | |
205 | 205 | /** |
206 | 206 | * @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 |
208 | 208 | */ |
209 | 209 | function getRealPath( $srcPath ) { |
210 | 210 | $repo = RepoGroup::singleton()->getLocalRepo(); |
Index: trunk/phase3/includes/upload/UploadFromChunks.php |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | |
130 | 130 | /** |
131 | 131 | * Returns the virtual chunk location: |
132 | | - * @param unknown_type $index |
| 132 | + * @param $index |
133 | 133 | */ |
134 | 134 | function getVirtualChunkLocation( $index ){ |
135 | 135 | return $this->repo->getVirtualUrl( 'temp' ) . |
— | — | @@ -138,12 +138,13 @@ |
139 | 139 | ) . |
140 | 140 | $this->getChunkFileKey( $index ); |
141 | 141 | } |
| 142 | + |
142 | 143 | /** |
143 | 144 | * Add a chunk to the temporary directory |
144 | 145 | * |
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 ) |
148 | 149 | * @return Status |
149 | 150 | */ |
150 | 151 | public function addChunk( $chunkPath, $chunkSize, $offset ) { |
Index: trunk/phase3/includes/Xml.php |
— | — | @@ -529,8 +529,8 @@ |
530 | 530 | /** |
531 | 531 | * Shortcut for creating fieldsets. |
532 | 532 | * |
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. |
535 | 535 | * @param $attribs array Any attributes to fieldset-element. |
536 | 536 | * |
537 | 537 | * @return string |
Index: trunk/phase3/includes/search/SearchEngine.php |
— | — | @@ -771,7 +771,7 @@ |
772 | 772 | } |
773 | 773 | |
774 | 774 | /** |
775 | | - * @return Double|null if not supported |
| 775 | + * @return float|null if not supported |
776 | 776 | */ |
777 | 777 | function getScore() { |
778 | 778 | return null; |
Index: trunk/phase3/includes/search/SearchMySQL.php |
— | — | @@ -290,7 +290,7 @@ |
291 | 291 | /** |
292 | 292 | * Get the base part of the search query. |
293 | 293 | * |
294 | | - * @param &$query Search query array |
| 294 | + * @param &$query array Search query array |
295 | 295 | * @param $filteredTerm String |
296 | 296 | * @param $fulltext Boolean |
297 | 297 | * @since 1.18 (changed) |
Index: trunk/phase3/includes/objectcache/BagOStuff.php |
— | — | @@ -93,8 +93,8 @@ |
94 | 94 | |
95 | 95 | /** |
96 | 96 | * 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 |
99 | 99 | * regularly during long-running operations with the percentage progress |
100 | 100 | * as the first parameter. |
101 | 101 | * |
Index: trunk/phase3/includes/LocalisationCache.php |
— | — | @@ -793,8 +793,8 @@ |
794 | 794 | interface LCStore { |
795 | 795 | /** |
796 | 796 | * 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 |
799 | 799 | */ |
800 | 800 | function get( $code, $key ); |
801 | 801 | |
— | — | @@ -1164,4 +1164,4 @@ |
1165 | 1165 | $this->unload( $code ); |
1166 | 1166 | } |
1167 | 1167 | } |
1168 | | -} |
\ No newline at end of file |
| 1168 | +} |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -642,7 +642,7 @@ |
643 | 643 | /** |
644 | 644 | * Accessor/mutator for the output type |
645 | 645 | * |
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 |
647 | 647 | * @return Integer |
648 | 648 | */ |
649 | 649 | function OutputType( $x = null ) { |
— | — | @@ -670,8 +670,8 @@ |
671 | 671 | /** |
672 | 672 | * Accessor/mutator for the ParserOptions object |
673 | 673 | * |
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 |
676 | 676 | */ |
677 | 677 | function Options( $x = null ) { |
678 | 678 | return wfSetVar( $this->mOptions, $x ); |
— | — | @@ -2093,7 +2093,7 @@ |
2094 | 2094 | * element appropriate to the prefix character passed into them. |
2095 | 2095 | * @private |
2096 | 2096 | * |
2097 | | - * @param $char char |
| 2097 | + * @param $char string |
2098 | 2098 | * |
2099 | 2099 | * @return string |
2100 | 2100 | */ |
— | — | @@ -2998,11 +2998,11 @@ |
2999 | 2999 | * 'post-expand-template-inclusion' (corresponding messages: |
3000 | 3000 | * 'post-expand-template-inclusion-warning', |
3001 | 3001 | * '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 |
3004 | 3004 | * exceeded, provide the values (optional) |
3005 | 3005 | */ |
3006 | | - function limitationWarn( $limitationType, $current=null, $max=null) { |
| 3006 | + function limitationWarn( $limitationType, $current = null, $max = null) { |
3007 | 3007 | # does no harm if $current and $max are present but are unnecessary for the message |
3008 | 3008 | $warning = wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ), $current, $max ); |
3009 | 3009 | $this->mOutput->addWarning( $warning ); |
— | — | @@ -3527,7 +3527,7 @@ |
3528 | 3528 | * If 'broken' is a key in $options then the file will appear as a broken thumbnail. |
3529 | 3529 | * @param Title $title |
3530 | 3530 | * @param Array $options Array of options to RepoGroup::findFile |
3531 | | - * @return File|false |
| 3531 | + * @return File|bool |
3532 | 3532 | */ |
3533 | 3533 | function fetchFile( $title, $options = array() ) { |
3534 | 3534 | $res = $this->fetchFileAndTitle( $title, $options ); |
— | — | @@ -4572,11 +4572,13 @@ |
4573 | 4573 | * |
4574 | 4574 | * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook> |
4575 | 4575 | * @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 |
4577 | 4577 | */ |
4578 | 4578 | public function setHook( $tag, $callback ) { |
4579 | 4579 | $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 | + } |
4581 | 4583 | $oldVal = isset( $this->mTagHooks[$tag] ) ? $this->mTagHooks[$tag] : null; |
4582 | 4584 | $this->mTagHooks[$tag] = $callback; |
4583 | 4585 | if ( !in_array( $tag, $this->mStripList ) ) { |
— | — | @@ -4600,11 +4602,13 @@ |
4601 | 4603 | * |
4602 | 4604 | * @param $tag Mixed: the tag to use, e.g. 'hook' for <hook> |
4603 | 4605 | * @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 |
4605 | 4607 | */ |
4606 | 4608 | function setTransparentTagHook( $tag, $callback ) { |
4607 | 4609 | $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 | + } |
4609 | 4613 | $oldVal = isset( $this->mTransparentTagHooks[$tag] ) ? $this->mTransparentTagHooks[$tag] : null; |
4610 | 4614 | $this->mTransparentTagHooks[$tag] = $callback; |
4611 | 4615 | |
— | — | @@ -5350,7 +5354,7 @@ |
5351 | 5355 | * section does not exist, $oldtext is returned unchanged. |
5352 | 5356 | * |
5353 | 5357 | * @param $oldtext String: former text of the article |
5354 | | - * @param $section Numeric: section identifier |
| 5358 | + * @param $section int section identifier |
5355 | 5359 | * @param $text String: replacing text |
5356 | 5360 | * @return String: modified text |
5357 | 5361 | */ |
— | — | @@ -5433,7 +5437,7 @@ |
5434 | 5438 | /** |
5435 | 5439 | * Mutator for $mDefaultSort |
5436 | 5440 | * |
5437 | | - * @param $sort New value |
| 5441 | + * @param $sort string New value |
5438 | 5442 | */ |
5439 | 5443 | public function setDefaultSort( $sort ) { |
5440 | 5444 | $this->mDefaultSort = $sort; |
— | — | @@ -5511,7 +5515,7 @@ |
5512 | 5516 | * |
5513 | 5517 | * @param $text String: text string to be stripped of wikitext |
5514 | 5518 | * for use in a Section anchor |
5515 | | - * @return Filtered text string |
| 5519 | + * @return string Filtered text string |
5516 | 5520 | */ |
5517 | 5521 | public function stripSectionName( $text ) { |
5518 | 5522 | # Strip internal link markup |
— | — | @@ -5650,7 +5654,7 @@ |
5651 | 5655 | * If the $data array has been stored persistently, the caller should first |
5652 | 5656 | * check whether it is still valid, by calling isValidHalfParsedText(). |
5653 | 5657 | * |
5654 | | - * @param $data Serialized data |
| 5658 | + * @param $data array Serialized data |
5655 | 5659 | * @return String |
5656 | 5660 | */ |
5657 | 5661 | function unserializeHalfParsedText( $data ) { |
Index: trunk/phase3/includes/parser/Tidy.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | * |
145 | 145 | * @param $text String: HTML to check |
146 | 146 | * @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) |
148 | 148 | * @return mixed String or null |
149 | 149 | */ |
150 | 150 | private static function execExternalTidy( $text, $stderr = false, &$retval = null ) { |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | * |
209 | 209 | * @param $text String: HTML to check |
210 | 210 | * @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) |
212 | 212 | * @return mixed String or null |
213 | 213 | */ |
214 | 214 | private static function execInternalTidy( $text, $stderr = false, &$retval = null ) { |
Index: trunk/phase3/includes/parser/Parser_LinkHooks.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | * @param $flags Integer: a combination of the following flags: |
86 | 86 | * SLH_PATTERN Use a regex link pattern rather than a namespace |
87 | 87 | * |
88 | | - * @return The old callback function for this name, if any |
| 88 | + * @return callback|null The old callback function for this name, if any |
89 | 89 | */ |
90 | 90 | public function setLinkHook( $ns, $callback, $flags = 0 ) { |
91 | 91 | if( $flags & SLH_PATTERN && !is_string($ns) ) |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -609,8 +609,9 @@ |
610 | 610 | /** |
611 | 611 | * Get the link parameters for MediaTransformOutput::toHtml() from given |
612 | 612 | * 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 |
615 | 616 | */ |
616 | 617 | private static function getImageLinkMTOParams( $frameParams, $query = '' ) { |
617 | 618 | $mtoParams = array(); |
— | — | @@ -1126,7 +1127,7 @@ |
1127 | 1128 | * Called by Linker::formatComment. |
1128 | 1129 | * |
1129 | 1130 | * @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 |
1131 | 1132 | * @param $local Boolean: whether section links should refer to local page |
1132 | 1133 | * @return String: formatted comment |
1133 | 1134 | */ |
— | — | @@ -1205,7 +1206,7 @@ |
1206 | 1207 | * |
1207 | 1208 | * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser |
1208 | 1209 | * @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 |
1210 | 1211 | * @param $local Boolean: whether section links should refer to local page |
1211 | 1212 | * @return String |
1212 | 1213 | */ |
— | — | @@ -1498,7 +1499,7 @@ |
1499 | 1500 | * Generate a table of contents from a section tree |
1500 | 1501 | * Currently unused. |
1501 | 1502 | * |
1502 | | - * @param $tree Return value of ParserOutput::getSections() |
| 1503 | + * @param $tree array Return value of ParserOutput::getSections() |
1503 | 1504 | * @return String: HTML fragment |
1504 | 1505 | */ |
1505 | 1506 | public static function generateTOC( $tree ) { |
— | — | @@ -1708,7 +1709,7 @@ |
1709 | 1710 | * Format a size in bytes for output, using an appropriate |
1710 | 1711 | * unit (B, KB, MB or GB) according to the magnitude in question |
1711 | 1712 | * |
1712 | | - * @param $size Size to format |
| 1713 | + * @param $size int Size to format |
1713 | 1714 | * @return String |
1714 | 1715 | */ |
1715 | 1716 | public static function formatSize( $size ) { |
— | — | @@ -1944,7 +1945,7 @@ |
1945 | 1946 | * @param $prefix String: text before link text |
1946 | 1947 | * @param $aprops String: extra attributes to the a-element |
1947 | 1948 | * @param $style String: style to apply - if empty, use getInternalLinkAttributesObj instead |
1948 | | - * @return the a-element |
| 1949 | + * @return string the a-element |
1949 | 1950 | */ |
1950 | 1951 | static function makeKnownLinkObj( |
1951 | 1952 | $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' |
Index: trunk/phase3/includes/profiler/Profiler.php |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | /** |
215 | 215 | * Recursive function the format the current profiling array into a tree |
216 | 216 | * |
217 | | - * @param $stack profiling array |
| 217 | + * @param $stack array profiling array |
218 | 218 | */ |
219 | 219 | function remapCallTree( $stack ) { |
220 | 220 | if( count( $stack ) < 2 ){ |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1309,7 +1309,7 @@ |
1310 | 1310 | /** |
1311 | 1311 | * Get/set the ParserOptions object to use for wikitext parsing |
1312 | 1312 | * |
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 |
1314 | 1314 | * current ParserOption object |
1315 | 1315 | * @return ParserOptions object |
1316 | 1316 | */ |
— | — | @@ -2344,7 +2344,7 @@ |
2345 | 2345 | * Add a "return to" link pointing to a specified title, |
2346 | 2346 | * or the title indicated in the request, or else the main page |
2347 | 2347 | * |
2348 | | - * @param $unused No longer used |
| 2348 | + * @param $unused |
2349 | 2349 | * @param $returnto Title or String to return to |
2350 | 2350 | * @param $returntoquery String: query string for the return to link |
2351 | 2351 | */ |
— | — | @@ -2932,7 +2932,7 @@ |
2933 | 2933 | } |
2934 | 2934 | |
2935 | 2935 | /** |
2936 | | - * @param $unused Unused |
| 2936 | + * @param $unused |
2937 | 2937 | * @param $addContentType bool |
2938 | 2938 | * |
2939 | 2939 | * @return string HTML tag links to be put in the header. |
Index: trunk/phase3/includes/logging/LogPage.php |
— | — | @@ -522,7 +522,7 @@ |
523 | 523 | * Convert a comma-delimited list of block log flags |
524 | 524 | * into a more readable (and translated) form |
525 | 525 | * |
526 | | - * @param $flags Flags to format |
| 526 | + * @param $flags string Flags to format |
527 | 527 | * @param $lang Language object to use |
528 | 528 | * @return String |
529 | 529 | */ |
Index: trunk/phase3/includes/logging/LogFormatter.php |
— | — | @@ -165,7 +165,7 @@ |
166 | 166 | * Returns a sentence describing the log action. Usually |
167 | 167 | * a Message object is returned, but old style log types |
168 | 168 | * and entries might return pre-escaped html string. |
169 | | - * @return Message|pre-escaped html |
| 169 | + * @return Message|string pre-escaped html |
170 | 170 | */ |
171 | 171 | protected function getActionMessage() { |
172 | 172 | $message = $this->msg( $this->getMessageKey() ); |
Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -298,8 +298,8 @@ |
299 | 299 | /** |
300 | 300 | * Recursively normalizes UTF-8 strings in the given array. |
301 | 301 | * |
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 |
304 | 304 | * @private |
305 | 305 | */ |
306 | 306 | function normalizeUnicode( $data ) { |
Index: trunk/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -215,7 +215,7 @@ |
216 | 216 | * Registers a module with the ResourceLoader system. |
217 | 217 | * |
218 | 218 | * @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, |
220 | 220 | * this may also be a ResourceLoaderModule object. Optional when using |
221 | 221 | * multiple-registration calling style. |
222 | 222 | * @throws MWException: If a duplicate module registration is attempted |
— | — | @@ -795,7 +795,7 @@ |
796 | 796 | * Returns JS code to call to mw.loader.implement for a module with |
797 | 797 | * given properties. |
798 | 798 | * |
799 | | - * @param $name Module name |
| 799 | + * @param $name string Module name |
800 | 800 | * @param $scripts Mixed: List of URLs to JavaScript files or String of JavaScript code |
801 | 801 | * @param $styles Mixed: List of CSS strings keyed by media type, or list of lists of URLs to |
802 | 802 | * CSS files keyed by media type |
Index: trunk/phase3/includes/media/FormatMetadata.php |
— | — | @@ -1021,7 +1021,7 @@ |
1022 | 1022 | * @private |
1023 | 1023 | * |
1024 | 1024 | * @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. |
1026 | 1026 | * @return mixed A floating point number or whatever we were fed |
1027 | 1027 | */ |
1028 | 1028 | static function formatNum( $num, $round = false ) { |
— | — | @@ -1102,7 +1102,8 @@ |
1103 | 1103 | return $a; |
1104 | 1104 | } |
1105 | 1105 | |
1106 | | - /** Fetch the human readable version of a news code. |
| 1106 | + /** |
| 1107 | + * Fetch the human readable version of a news code. |
1107 | 1108 | * A news code is an 8 digit code. The first two |
1108 | 1109 | * digits are a general classification, so we just |
1109 | 1110 | * translate that. |
— | — | @@ -1111,7 +1112,7 @@ |
1112 | 1113 | * a string, not an int. |
1113 | 1114 | * |
1114 | 1115 | * @param $val String: The 8 digit news code. |
1115 | | - * @return The human readable form |
| 1116 | + * @return srting The human readable form |
1116 | 1117 | */ |
1117 | 1118 | static private function convertNewsCode( $val ) { |
1118 | 1119 | if ( !preg_match( '/^\d{8}$/D', $val ) ) { |
Index: trunk/phase3/includes/media/BitmapMetadataHandler.php |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | /** Main entry point for jpeg's. |
124 | 124 | * |
125 | 125 | * @param $filename string filename (with full path) |
126 | | - * @return metadata result array. |
| 126 | + * @return array metadata result array. |
127 | 127 | * @throws MWException on invalid file. |
128 | 128 | */ |
129 | 129 | static function Jpeg ( $filename ) { |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | * match the handler class, a Status object should be returned containing |
473 | 473 | * relevant errors. |
474 | 474 | * |
475 | | - * @param $fileName The local path to the file. |
| 475 | + * @param $fileName string The local path to the file. |
476 | 476 | * @return Status object |
477 | 477 | */ |
478 | 478 | function verifyUpload( $fileName ) { |
— | — | @@ -651,7 +651,7 @@ |
652 | 652 | * @param $height Integer: height (output only) |
653 | 653 | * @param $srcWidth Integer: width of the source image |
654 | 654 | * @param $srcHeight Integer: height of the source image |
655 | | - * @param $mimeType Unused |
| 655 | + * @param $mimeType |
656 | 656 | * @return bool to indicate that an error should be returned to the user. |
657 | 657 | */ |
658 | 658 | function validateThumbParams( &$width, &$height, $srcWidth, $srcHeight, $mimeType ) { |
Index: trunk/phase3/includes/media/JpegMetadataExtractor.php |
— | — | @@ -143,13 +143,17 @@ |
144 | 144 | /** |
145 | 145 | * Helper function for jpegSegmentSplitter |
146 | 146 | * @param &$fh FileHandle for jpeg file |
147 | | - * @return data content of segment. |
| 147 | + * @return string data content of segment. |
148 | 148 | */ |
149 | 149 | private static function jpegExtractMarker( &$fh ) { |
150 | 150 | $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 | + } |
152 | 154 | $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 | + } |
154 | 158 | return $segment; |
155 | 159 | } |
156 | 160 | |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -1284,7 +1284,7 @@ |
1285 | 1285 | * with action=render, $wgServer is prepended. |
1286 | 1286 | * |
1287 | 1287 | |
1288 | | - * @param $query \twotypes{\string,\array} an optional query string, |
| 1288 | + * @param $query string|array an optional query string, |
1289 | 1289 | * not used for interwiki links. Can be specified as an associative array as well, |
1290 | 1290 | * e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped). |
1291 | 1291 | * Some query patterns will trigger various shorturl path replacements. |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1023,7 +1023,7 @@ |
1024 | 1024 | * @param $dbw DatabaseBase |
1025 | 1025 | * @param $redirectTitle Title object pointing to the redirect target, |
1026 | 1026 | * 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 |
1028 | 1028 | * removing rows in redirect table. |
1029 | 1029 | * @return bool true on success, false on failure |
1030 | 1030 | * @private |
— | — | @@ -1124,7 +1124,7 @@ |
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | /** |
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...) |
1129 | 1129 | * @param $text String: new text of the section |
1130 | 1130 | * @param $sectionTitle String: new section's subject, only if $section is 'new' |
1131 | 1131 | * @param $edittime String: revision timestamp or null to use the current revision |
— | — | @@ -1223,7 +1223,7 @@ |
1224 | 1224 | * edit-already-exists error will be returned. These two conditions are also possible with |
1225 | 1225 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
1226 | 1226 | * |
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 |
1228 | 1228 | * @param $user User the user doing the edit |
1229 | 1229 | * |
1230 | 1230 | * @return Status object. Possible errors: |
— | — | @@ -1917,7 +1917,7 @@ |
1918 | 1918 | * Deletes the article with database consistency, writes logs, purges caches |
1919 | 1919 | * |
1920 | 1920 | * @param $reason string delete reason for deletion log |
1921 | | - * @param $suppress bitfield |
| 1921 | + * @param $suppress int bitfield |
1922 | 1922 | * Revision::DELETED_TEXT |
1923 | 1923 | * Revision::DELETED_COMMENT |
1924 | 1924 | * Revision::DELETED_USER |
— | — | @@ -1940,7 +1940,7 @@ |
1941 | 1941 | * Deletes the article with database consistency, writes logs, purges caches |
1942 | 1942 | * |
1943 | 1943 | * @param $reason string delete reason for deletion log |
1944 | | - * @param $suppress bitfield |
| 1944 | + * @param $suppress int bitfield |
1945 | 1945 | * Revision::DELETED_TEXT |
1946 | 1946 | * Revision::DELETED_COMMENT |
1947 | 1947 | * Revision::DELETED_USER |
— | — | @@ -2829,7 +2829,7 @@ |
2830 | 2830 | private $text; |
2831 | 2831 | |
2832 | 2832 | /** |
2833 | | - * @var ParserOutput|false |
| 2833 | + * @var ParserOutput|bool |
2834 | 2834 | */ |
2835 | 2835 | private $parserOutput = false; |
2836 | 2836 | |
— | — | @@ -2839,7 +2839,7 @@ |
2840 | 2840 | private $isDirty = false; |
2841 | 2841 | |
2842 | 2842 | /** |
2843 | | - * @var Status|false |
| 2843 | + * @var Status|bool |
2844 | 2844 | */ |
2845 | 2845 | private $error = false; |
2846 | 2846 | |
— | — | @@ -2883,7 +2883,7 @@ |
2884 | 2884 | /** |
2885 | 2885 | * Get a Status object in case of error or false otherwise |
2886 | 2886 | * |
2887 | | - * @return Status|false |
| 2887 | + * @return Status|bool |
2888 | 2888 | */ |
2889 | 2889 | public function getError() { |
2890 | 2890 | return $this->error; |
Index: trunk/phase3/includes/ZipDirectoryReader.php |
— | — | @@ -297,7 +297,7 @@ |
298 | 298 | * Find the location of the central directory, as would be seen by a |
299 | 299 | * ZIP64-compliant reader. |
300 | 300 | * |
301 | | - * @return List containing offset, size and end position. |
| 301 | + * @return array List containing offset, size and end position. |
302 | 302 | */ |
303 | 303 | function findZip64CentralDirectory() { |
304 | 304 | // The spec is ambiguous about the exact rules of precedence between the |
— | — | @@ -473,8 +473,8 @@ |
474 | 474 | * Get the file contents from a given offset. If there are not enough bytes |
475 | 475 | * in the file to satisfy the request, an exception will be thrown. |
476 | 476 | * |
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 |
479 | 479 | * of the file will be returned. |
480 | 480 | * |
481 | 481 | * @return string |
— | — | @@ -560,9 +560,9 @@ |
561 | 561 | * Unpack a binary structure. This is like the built-in unpack() function |
562 | 562 | * except nicer. |
563 | 563 | * |
564 | | - * @param $string The binary data input |
| 564 | + * @param $string string The binary data input |
565 | 565 | * |
566 | | - * @param $struct An associative array giving structure members and their |
| 566 | + * @param $struct array An associative array giving structure members and their |
567 | 567 | * types. In the key is the field name. The value may be either an |
568 | 568 | * integer, in which case the field is a little-endian unsigned integer |
569 | 569 | * encoded in the given number of bytes, or an array, in which case the |
— | — | @@ -571,9 +571,9 @@ |
572 | 572 | * - "string": The second array element gives the length of string. |
573 | 573 | * Not null terminated. |
574 | 574 | * |
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. |
576 | 576 | * |
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 |
578 | 578 | * may be represented as floating point numbers in the return value, so |
579 | 579 | * the use of weak comparison is advised. |
580 | 580 | */ |
— | — | @@ -628,7 +628,8 @@ |
629 | 629 | * boolean. |
630 | 630 | * |
631 | 631 | * @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 |
633 | 634 | */ |
634 | 635 | function testBit( $value, $bitIndex ) { |
635 | 636 | return (bool)( ( $value >> $bitIndex ) & 1 ); |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -1264,7 +1264,7 @@ |
1265 | 1265 | * |
1266 | 1266 | * @param $rev Revision |
1267 | 1267 | * @param $titleObj Title |
1268 | | - * @param $ts Timestamp |
| 1268 | + * @param $ts string Timestamp |
1269 | 1269 | * @return string |
1270 | 1270 | */ |
1271 | 1271 | function getPageLink( $rev, $titleObj, $ts ) { |
— | — | @@ -1295,7 +1295,7 @@ |
1296 | 1296 | * |
1297 | 1297 | * @param $file File |
1298 | 1298 | * @param $titleObj Title |
1299 | | - * @param $ts A timestamp |
| 1299 | + * @param $ts string A timestamp |
1300 | 1300 | * @param $key String: a storage key |
1301 | 1301 | * |
1302 | 1302 | * @return String: HTML fragment |
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php |
— | — | @@ -520,7 +520,7 @@ |
521 | 521 | * Build a set of links for convenient navigation |
522 | 522 | * between watchlist viewing and editing modes |
523 | 523 | * |
524 | | - * @param $unused Unused |
| 524 | + * @param $unused |
525 | 525 | * @return string |
526 | 526 | */ |
527 | 527 | public static function buildTools( $unused ) { |
Index: trunk/phase3/includes/specials/SpecialBooksources.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | /** |
48 | 48 | * Show the special page |
49 | 49 | * |
50 | | - * @param $isbn ISBN passed as a subpage parameter |
| 50 | + * @param $isbn string ISBN passed as a subpage parameter |
51 | 51 | */ |
52 | 52 | public function execute( $isbn ) { |
53 | 53 | $this->setHeaders(); |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | |
65 | 65 | /** |
66 | 66 | * 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 |
68 | 68 | */ |
69 | 69 | public static function isValidISBN( $isbn ) { |
70 | 70 | $isbn = self::cleanIsbn( $isbn ); |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | /** |
102 | 102 | * Trim ISBN and remove characters which aren't required |
103 | 103 | * |
104 | | - * @param $isbn Unclean ISBN |
| 104 | + * @param $isbn string Unclean ISBN |
105 | 105 | * @return string |
106 | 106 | */ |
107 | 107 | private static function cleanIsbn( $isbn ) { |
— | — | @@ -160,8 +160,8 @@ |
161 | 161 | /** |
162 | 162 | * Format a book source list item |
163 | 163 | * |
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 |
166 | 166 | * @return string |
167 | 167 | */ |
168 | 168 | private function makeListItem( $label, $url ) { |
Index: trunk/phase3/includes/specials/SpecialConfirmemail.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | * Attempt to confirm the user's email address and show success or failure |
112 | 112 | * as needed; if successful, take the user to log in |
113 | 113 | * |
114 | | - * @param $code Confirmation code |
| 114 | + * @param $code string Confirmation code |
115 | 115 | */ |
116 | 116 | function attemptConfirm( $code ) { |
117 | 117 | $user = User::newFromConfirmationCode( $code ); |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | * Attempt to invalidate the user's email address and show success or failure |
158 | 158 | * as needed; if successful, link to main page |
159 | 159 | * |
160 | | - * @param $code Confirmation code |
| 160 | + * @param $code string Confirmation code |
161 | 161 | */ |
162 | 162 | function attemptInvalidate( $code ) { |
163 | 163 | $user = User::newFromConfirmationCode( $code ); |
Index: trunk/phase3/includes/SiteConfiguration.php |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | * @param $setting String ID of the setting name to retrieve |
212 | 212 | * @param $wiki String Wiki ID of the wiki in question. |
213 | 213 | * @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. |
215 | 215 | * @param $params Array List of parameters. $.'key' is replaced by $value in all returned data. |
216 | 216 | * @param $wikiTags Array The tags assigned to the wiki. |
217 | 217 | */ |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -317,7 +317,7 @@ |
318 | 318 | * Make a <script> tag containing global variables |
319 | 319 | * |
320 | 320 | * @deprecated in 1.19 |
321 | | - * @param $unused Unused |
| 321 | + * @param $unused |
322 | 322 | * @return string HTML fragment |
323 | 323 | */ |
324 | 324 | public static function makeGlobalVariablesScript( $unused ) { |