@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Return the list of revision fields that should be selected to create |
| 262 | 262 | * a new page. |
| 263 | 263 | * |
| 264 | - * @return array |
|
| 264 | + * @return string[] |
|
| 265 | 265 | */ |
| 266 | 266 | public static function selectFields() { |
| 267 | 267 | global $wgContentHandlerUseDB, $wgPageLanguageUseDB; |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | |
| 523 | 523 | /** |
| 524 | 524 | * Get the page_links_updated field |
| 525 | - * @return string|null Containing GMT timestamp |
|
| 525 | + * @return string Containing GMT timestamp |
|
| 526 | 526 | */ |
| 527 | 527 | public function getLinksTimestamp() { |
| 528 | 528 | if ( !$this->mDataLoaded ) { |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | * @param null|int $oldid Revision ID to get the text from, passing null or 0 will |
| 1051 | 1051 | * get the current revision (default value) |
| 1052 | 1052 | * |
| 1053 | - * @return ParserOutput|bool ParserOutput or false if the revision was not found |
|
| 1053 | + * @return ParserOutput ParserOutput or false if the revision was not found |
|
| 1054 | 1054 | */ |
| 1055 | 1055 | public function getParserOutput( ParserOptions $parserOptions, $oldid = null ) { |
| 1056 | 1056 | |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | * @param IDatabase $dbw |
| 1152 | 1152 | * @param int|null $pageId Custom page ID that will be used for the insert statement |
| 1153 | 1153 | * |
| 1154 | - * @return bool|int The newly created page_id key; false if the title already existed |
|
| 1154 | + * @return integer The newly created page_id key; false if the title already existed |
|
| 1155 | 1155 | */ |
| 1156 | 1156 | public function insertOn( $dbw, $pageId = null ) { |
| 1157 | 1157 | $pageIdForInsert = $pageId ?: $dbw->nextSequenceValue( 'page_page_id_seq' ); |
@@ -1408,7 +1408,7 @@ discard block |
||
| 1408 | 1408 | * @param int|null $baseRevId |
| 1409 | 1409 | * |
| 1410 | 1410 | * @throws MWException |
| 1411 | - * @return Content|null New complete article content, or null if error. |
|
| 1411 | + * @return Content New complete article content, or null if error. |
|
| 1412 | 1412 | * |
| 1413 | 1413 | * @since 1.24 |
| 1414 | 1414 | */ |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | * error will be returned. These two conditions are also possible with |
| 1495 | 1495 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
| 1496 | 1496 | * |
| 1497 | - * @param bool|int $baseRevId The revision ID this edit was based off, if any. |
|
| 1497 | + * @param boolean $baseRevId The revision ID this edit was based off, if any. |
|
| 1498 | 1498 | * This is not the parent revision ID, rather the revision ID for older |
| 1499 | 1499 | * content used as the source for a rollback, for example. |
| 1500 | 1500 | * @param User $user The user doing the edit |
@@ -3320,7 +3320,7 @@ discard block |
||
| 3320 | 3320 | * Returns a list of categories this page is a member of. |
| 3321 | 3321 | * Results will include hidden categories |
| 3322 | 3322 | * |
| 3323 | - * @return TitleArray |
|
| 3323 | + * @return TitleArrayFromResult|null |
|
| 3324 | 3324 | */ |
| 3325 | 3325 | public function getCategories() { |
| 3326 | 3326 | $id = $this->getId(); |
@@ -3395,7 +3395,7 @@ discard block |
||
| 3395 | 3395 | * Auto-generates a deletion reason |
| 3396 | 3396 | * |
| 3397 | 3397 | * @param bool &$hasHistory Whether the page has a history |
| 3398 | - * @return string|bool String containing deletion reason or empty string, or boolean false |
|
| 3398 | + * @return false|string String containing deletion reason or empty string, or boolean false |
|
| 3399 | 3399 | * if no revision occurred |
| 3400 | 3400 | */ |
| 3401 | 3401 | public function getAutoDeleteReason( &$hasHistory ) { |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | /** |
| 385 | - * @return string|null TS_MW timestamp of the revision content |
|
| 385 | + * @return string TS_MW timestamp of the revision content |
|
| 386 | 386 | */ |
| 387 | 387 | public function getTimestamp() { |
| 388 | 388 | return $this->mTimestamp; |
@@ -400,6 +400,9 @@ discard block |
||
| 400 | 400 | return $this->mEnableOOUI; |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | + /** |
|
| 404 | + * @param string $text |
|
| 405 | + */ |
|
| 403 | 406 | public function setText( $text ) { |
| 404 | 407 | return wfSetVar( $this->mText, $text ); |
| 405 | 408 | } |
@@ -412,6 +415,9 @@ discard block |
||
| 412 | 415 | return wfSetVar( $this->mCategories, $cl ); |
| 413 | 416 | } |
| 414 | 417 | |
| 418 | + /** |
|
| 419 | + * @param boolean|string $t |
|
| 420 | + */ |
|
| 415 | 421 | public function setTitleText( $t ) { |
| 416 | 422 | return wfSetVar( $this->mTitleText, $t ); |
| 417 | 423 | } |
@@ -420,32 +426,52 @@ discard block |
||
| 420 | 426 | return wfSetVar( $this->mSections, $toc ); |
| 421 | 427 | } |
| 422 | 428 | |
| 429 | + /** |
|
| 430 | + * @param boolean $t |
|
| 431 | + */ |
|
| 423 | 432 | public function setEditSectionTokens( $t ) { |
| 424 | 433 | return wfSetVar( $this->mEditSectionTokens, $t ); |
| 425 | 434 | } |
| 426 | 435 | |
| 436 | + /** |
|
| 437 | + * @param string $policy |
|
| 438 | + */ |
|
| 427 | 439 | public function setIndexPolicy( $policy ) { |
| 428 | 440 | return wfSetVar( $this->mIndexPolicy, $policy ); |
| 429 | 441 | } |
| 430 | 442 | |
| 443 | + /** |
|
| 444 | + * @param string $tochtml |
|
| 445 | + */ |
|
| 431 | 446 | public function setTOCHTML( $tochtml ) { |
| 432 | 447 | return wfSetVar( $this->mTOCHTML, $tochtml ); |
| 433 | 448 | } |
| 434 | 449 | |
| 450 | + /** |
|
| 451 | + * @param string|false $timestamp |
|
| 452 | + */ |
|
| 435 | 453 | public function setTimestamp( $timestamp ) { |
| 436 | 454 | return wfSetVar( $this->mTimestamp, $timestamp ); |
| 437 | 455 | } |
| 438 | 456 | |
| 457 | + /** |
|
| 458 | + * @param boolean $flag |
|
| 459 | + */ |
|
| 439 | 460 | public function setTOCEnabled( $flag ) { |
| 440 | 461 | return wfSetVar( $this->mTOCEnabled, $flag ); |
| 441 | 462 | } |
| 442 | 463 | |
| 464 | + /** |
|
| 465 | + * @param string $c |
|
| 466 | + */ |
|
| 443 | 467 | public function addCategory( $c, $sort ) { |
| 444 | 468 | $this->mCategories[$c] = $sort; |
| 445 | 469 | } |
| 446 | 470 | |
| 447 | 471 | /** |
| 448 | 472 | * @since 1.25 |
| 473 | + * @param string $id |
|
| 474 | + * @param string $content |
|
| 449 | 475 | */ |
| 450 | 476 | public function setIndicator( $id, $content ) { |
| 451 | 477 | $this->mIndicators[$id] = $content; |
@@ -462,10 +488,16 @@ discard block |
||
| 462 | 488 | $this->mEnableOOUI = $enable; |
| 463 | 489 | } |
| 464 | 490 | |
| 491 | + /** |
|
| 492 | + * @param string $t |
|
| 493 | + */ |
|
| 465 | 494 | public function addLanguageLink( $t ) { |
| 466 | 495 | $this->mLanguageLinks[] = $t; |
| 467 | 496 | } |
| 468 | 497 | |
| 498 | + /** |
|
| 499 | + * @param string $s |
|
| 500 | + */ |
|
| 469 | 501 | public function addWarning( $s ) { |
| 470 | 502 | $this->mWarnings[$s] = 1; |
| 471 | 503 | } |
@@ -474,9 +506,16 @@ discard block |
||
| 474 | 506 | $this->mOutputHooks[] = [ $hook, $data ]; |
| 475 | 507 | } |
| 476 | 508 | |
| 509 | + /** |
|
| 510 | + * @param boolean $value |
|
| 511 | + */ |
|
| 477 | 512 | public function setNewSection( $value ) { |
| 478 | 513 | $this->mNewSection = (bool)$value; |
| 479 | 514 | } |
| 515 | + |
|
| 516 | + /** |
|
| 517 | + * @param boolean $value |
|
| 518 | + */ |
|
| 480 | 519 | public function hideNewSection( $value ) { |
| 481 | 520 | $this->mHideNewSection = (bool)$value; |
| 482 | 521 | } |
@@ -750,6 +789,9 @@ discard block |
||
| 750 | 789 | $this->mFlags[$flag] = true; |
| 751 | 790 | } |
| 752 | 791 | |
| 792 | + /** |
|
| 793 | + * @param string $flag |
|
| 794 | + */ |
|
| 753 | 795 | public function getFlag( $flag ) { |
| 754 | 796 | return isset( $this->mFlags[$flag] ); |
| 755 | 797 | } |
@@ -813,6 +855,8 @@ discard block |
||
| 813 | 855 | * $parser->getOutput()->my_ext_foo = '...'; |
| 814 | 856 | * @endcode |
| 815 | 857 | * |
| 858 | + * @param string $name |
|
| 859 | + * @param string $value |
|
| 816 | 860 | */ |
| 817 | 861 | public function setProperty( $name, $value ) { |
| 818 | 862 | $this->mProperties[$name] = $value; |
@@ -821,7 +865,7 @@ discard block |
||
| 821 | 865 | /** |
| 822 | 866 | * @param string $name The property name to look up. |
| 823 | 867 | * |
| 824 | - * @return mixed|bool The value previously set using setProperty(). False if null or no value |
|
| 868 | + * @return string The value previously set using setProperty(). False if null or no value |
|
| 825 | 869 | * was set for the given property name. |
| 826 | 870 | * |
| 827 | 871 | * @note You need to use getProperties() to check for boolean and null properties. |
@@ -936,6 +980,9 @@ discard block |
||
| 936 | 980 | return null; |
| 937 | 981 | } |
| 938 | 982 | |
| 983 | + /** |
|
| 984 | + * @param string $clock |
|
| 985 | + */ |
|
| 939 | 986 | private static function getTimes( $clock = null ) { |
| 940 | 987 | $ret = []; |
| 941 | 988 | if ( !$clock || $clock === 'wall' ) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Fields in the oldimage table |
| 106 | - * @return array |
|
| 106 | + * @return string[] |
|
| 107 | 107 | */ |
| 108 | 108 | static function selectFields() { |
| 109 | 109 | return array( |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | 234 | * @param string $prefix |
| 235 | - * @return array |
|
| 235 | + * @return string[] |
|
| 236 | 236 | */ |
| 237 | 237 | function getCacheFields( $prefix = 'img_' ) { |
| 238 | 238 | $fields = parent::getCacheFields( $prefix ); |
@@ -2183,7 +2183,7 @@ discard block |
||
| 2183 | 2183 | * |
| 2184 | 2184 | * @param string $text |
| 2185 | 2185 | * |
| 2186 | - * @return string|bool Matching string or false |
|
| 2186 | + * @return string|false Matching string or false |
|
| 2187 | 2187 | */ |
| 2188 | 2188 | public static function matchSpamRegex( $text ) { |
| 2189 | 2189 | global $wgSpamRegex; |
@@ -2197,7 +2197,7 @@ discard block |
||
| 2197 | 2197 | * |
| 2198 | 2198 | * @param string $text |
| 2199 | 2199 | * |
| 2200 | - * @return string|bool Matching string or false |
|
| 2200 | + * @return string|false Matching string or false |
|
| 2201 | 2201 | */ |
| 2202 | 2202 | public static function matchSummarySpamRegex( $text ) { |
| 2203 | 2203 | global $wgSummarySpamRegex; |
@@ -2208,7 +2208,7 @@ discard block |
||
| 2208 | 2208 | /** |
| 2209 | 2209 | * @param string $text |
| 2210 | 2210 | * @param array $regexes |
| 2211 | - * @return bool|string |
|
| 2211 | + * @return string|false |
|
| 2212 | 2212 | */ |
| 2213 | 2213 | protected static function matchSpamRegexInternal( $text, $regexes ) { |
| 2214 | 2214 | foreach ( $regexes as $regex ) { |
@@ -2448,7 +2448,7 @@ discard block |
||
| 2448 | 2448 | * $this->allowNonTextContent to true to allow editing of non-textual |
| 2449 | 2449 | * content. |
| 2450 | 2450 | * |
| 2451 | - * @param string|null|bool $text Text to unserialize |
|
| 2451 | + * @param false|string $text Text to unserialize |
|
| 2452 | 2452 | * @return Content The content object created from $text. If $text was false |
| 2453 | 2453 | * or null, false resp. null will be returned instead. |
| 2454 | 2454 | * |
@@ -3139,6 +3139,10 @@ discard block |
||
| 3139 | 3139 | $this->showTextbox( $this->textbox2, 'wpTextbox2', [ 'tabindex' => 6, 'readonly' ] ); |
| 3140 | 3140 | } |
| 3141 | 3141 | |
| 3142 | + /** |
|
| 3143 | + * @param string $text |
|
| 3144 | + * @param string $name |
|
| 3145 | + */ |
|
| 3142 | 3146 | protected function showTextbox( $text, $name, $customAttribs = [] ) { |
| 3143 | 3147 | global $wgOut, $wgUser; |
| 3144 | 3148 | |
@@ -3168,6 +3172,9 @@ discard block |
||
| 3168 | 3172 | $wgOut->addHTML( Html::textarea( $name, $wikitext, $attribs ) ); |
| 3169 | 3173 | } |
| 3170 | 3174 | |
| 3175 | + /** |
|
| 3176 | + * @param string $previewOutput |
|
| 3177 | + */ |
|
| 3171 | 3178 | protected function displayPreviewArea( $previewOutput, $isOnTop = false ) { |
| 3172 | 3179 | global $wgOut; |
| 3173 | 3180 | $classes = []; |
@@ -3754,7 +3761,7 @@ discard block |
||
| 3754 | 3761 | } |
| 3755 | 3762 | |
| 3756 | 3763 | /** |
| 3757 | - * @return array |
|
| 3764 | + * @return Title[] |
|
| 3758 | 3765 | */ |
| 3759 | 3766 | function getTemplates() { |
| 3760 | 3767 | if ( $this->preview || $this->section != '' ) { |
@@ -3917,7 +3924,7 @@ discard block |
||
| 3917 | 3924 | * @param array $checked Array of checkbox => bool, where bool indicates the checked |
| 3918 | 3925 | * status of the checkbox |
| 3919 | 3926 | * |
| 3920 | - * @return array |
|
| 3927 | + * @return string |
|
| 3921 | 3928 | */ |
| 3922 | 3929 | public function getCheckboxes( &$tabindex, $checked ) { |
| 3923 | 3930 | global $wgUser, $wgUseMediaWikiUIEverywhere; |
@@ -3981,7 +3988,7 @@ discard block |
||
| 3981 | 3988 | * |
| 3982 | 3989 | * @param int $tabindex Current tabindex |
| 3983 | 3990 | * |
| 3984 | - * @return array |
|
| 3991 | + * @return string |
|
| 3985 | 3992 | */ |
| 3986 | 3993 | public function getEditButtons( &$tabindex ) { |
| 3987 | 3994 | $buttons = []; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param bool $ie8Compat By default, a data URI will only be produced if it can be made short |
| 101 | 101 | * enough to fit in Internet Explorer 8 (and earlier) URI length limit (32,768 bytes). Pass |
| 102 | 102 | * `false` to remove this limitation. |
| 103 | - * @return string|bool Image contents encoded as a data URI or false. |
|
| 103 | + * @return false|string Image contents encoded as a data URI or false. |
|
| 104 | 104 | */ |
| 105 | 105 | public static function encodeImageAsDataURI( $file, $type = null, $ie8Compat = true ) { |
| 106 | 106 | // Fast-fail for files that definitely exceed the maximum data URI length |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * @param string $contents File contents to encode. |
| 129 | 129 | * @param string $type File's MIME type. |
| 130 | 130 | * @param bool $ie8Compat See encodeImageAsDataURI(). |
| 131 | - * @return string|bool Image contents encoded as a data URI or false. |
|
| 131 | + * @return string|false Image contents encoded as a data URI or false. |
|
| 132 | 132 | */ |
| 133 | 133 | public static function encodeStringAsDataURI( $contents, $type, $ie8Compat = true ) { |
| 134 | 134 | // Try #1: Non-encoded data URI |
@@ -563,7 +563,7 @@ |
||
| 563 | 563 | * @param array $params Rotate parameters. |
| 564 | 564 | * 'rotation' clockwise rotation in degrees, allowed are multiples of 90 |
| 565 | 565 | * @since 1.24 Is non-static. From 1.21 it was static |
| 566 | - * @return bool |
|
| 566 | + * @return MediaTransformError |
|
| 567 | 567 | */ |
| 568 | 568 | public function rotate( $file, $params ) { |
| 569 | 569 | return new MediaTransformError( 'thumbnail_error', 0, 0, |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * It's important that img_media_type come first, otherwise the |
| 102 | 102 | * tables will be fragmented. |
| 103 | - * @return Array Fields to sort by |
|
| 103 | + * @return string[] Fields to sort by |
|
| 104 | 104 | */ |
| 105 | 105 | function getOrderFields() { |
| 106 | 106 | return [ 'img_media_type', 'count(*)', 'img_major_mime', 'img_minor_mime' ]; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * |
| 171 | 171 | * @param string $mime mime type (e.g. image/jpeg) |
| 172 | 172 | * @param int $count Number of images of this type |
| 173 | - * @param int $totalBytes Total space for images of this type |
|
| 173 | + * @param integer $bytes |
|
| 174 | 174 | */ |
| 175 | 175 | protected function outputTableRow( $mime, $count, $bytes ) { |
| 176 | 176 | $mimeSearch = SpecialPage::getTitleFor( 'MIMEsearch', $mime ); |