@@ -416,6 +416,9 @@ discard block |
||
416 | 416 | return $this->mEnableOOUI; |
417 | 417 | } |
418 | 418 | |
419 | + /** |
|
420 | + * @param string $text |
|
421 | + */ |
|
419 | 422 | public function setText( $text ) { |
420 | 423 | return wfSetVar( $this->mText, $text ); |
421 | 424 | } |
@@ -436,32 +439,52 @@ discard block |
||
436 | 439 | return wfSetVar( $this->mSections, $toc ); |
437 | 440 | } |
438 | 441 | |
442 | + /** |
|
443 | + * @param boolean $t |
|
444 | + */ |
|
439 | 445 | public function setEditSectionTokens( $t ) { |
440 | 446 | return wfSetVar( $this->mEditSectionTokens, $t ); |
441 | 447 | } |
442 | 448 | |
449 | + /** |
|
450 | + * @param string $policy |
|
451 | + */ |
|
443 | 452 | public function setIndexPolicy( $policy ) { |
444 | 453 | return wfSetVar( $this->mIndexPolicy, $policy ); |
445 | 454 | } |
446 | 455 | |
456 | + /** |
|
457 | + * @param string $tochtml |
|
458 | + */ |
|
447 | 459 | public function setTOCHTML( $tochtml ) { |
448 | 460 | return wfSetVar( $this->mTOCHTML, $tochtml ); |
449 | 461 | } |
450 | 462 | |
463 | + /** |
|
464 | + * @param string|false $timestamp |
|
465 | + */ |
|
451 | 466 | public function setTimestamp( $timestamp ) { |
452 | 467 | return wfSetVar( $this->mTimestamp, $timestamp ); |
453 | 468 | } |
454 | 469 | |
470 | + /** |
|
471 | + * @param boolean $flag |
|
472 | + */ |
|
455 | 473 | public function setTOCEnabled( $flag ) { |
456 | 474 | return wfSetVar( $this->mTOCEnabled, $flag ); |
457 | 475 | } |
458 | 476 | |
477 | + /** |
|
478 | + * @param string $c |
|
479 | + */ |
|
459 | 480 | public function addCategory( $c, $sort ) { |
460 | 481 | $this->mCategories[$c] = $sort; |
461 | 482 | } |
462 | 483 | |
463 | 484 | /** |
464 | 485 | * @since 1.25 |
486 | + * @param string $id |
|
487 | + * @param string $content |
|
465 | 488 | */ |
466 | 489 | public function setIndicator( $id, $content ) { |
467 | 490 | $this->mIndicators[$id] = $content; |
@@ -478,10 +501,16 @@ discard block |
||
478 | 501 | $this->mEnableOOUI = $enable; |
479 | 502 | } |
480 | 503 | |
504 | + /** |
|
505 | + * @param string $t |
|
506 | + */ |
|
481 | 507 | public function addLanguageLink( $t ) { |
482 | 508 | $this->mLanguageLinks[] = $t; |
483 | 509 | } |
484 | 510 | |
511 | + /** |
|
512 | + * @param string $s |
|
513 | + */ |
|
485 | 514 | public function addWarning( $s ) { |
486 | 515 | $this->mWarnings[$s] = 1; |
487 | 516 | } |
@@ -490,9 +519,16 @@ discard block |
||
490 | 519 | $this->mOutputHooks[] = [ $hook, $data ]; |
491 | 520 | } |
492 | 521 | |
522 | + /** |
|
523 | + * @param boolean $value |
|
524 | + */ |
|
493 | 525 | public function setNewSection( $value ) { |
494 | 526 | $this->mNewSection = (bool)$value; |
495 | 527 | } |
528 | + |
|
529 | + /** |
|
530 | + * @param boolean $value |
|
531 | + */ |
|
496 | 532 | public function hideNewSection( $value ) { |
497 | 533 | $this->mHideNewSection = (bool)$value; |
498 | 534 | } |
@@ -829,6 +865,8 @@ discard block |
||
829 | 865 | * $parser->getOutput()->my_ext_foo = '...'; |
830 | 866 | * @endcode |
831 | 867 | * |
868 | + * @param string $name |
|
869 | + * @param string $value |
|
832 | 870 | */ |
833 | 871 | public function setProperty( $name, $value ) { |
834 | 872 | $this->mProperties[$name] = $value; |
@@ -837,7 +875,7 @@ discard block |
||
837 | 875 | /** |
838 | 876 | * @param string $name The property name to look up. |
839 | 877 | * |
840 | - * @return mixed|bool The value previously set using setProperty(). False if null or no value |
|
878 | + * @return string The value previously set using setProperty(). False if null or no value |
|
841 | 879 | * was set for the given property name. |
842 | 880 | * |
843 | 881 | * @note You need to use getProperties() to check for boolean and null properties. |
@@ -952,6 +990,9 @@ discard block |
||
952 | 990 | return null; |
953 | 991 | } |
954 | 992 | |
993 | + /** |
|
994 | + * @param string $clock |
|
995 | + */ |
|
955 | 996 | private static function getTimes( $clock = null ) { |
956 | 997 | $ret = []; |
957 | 998 | if ( !$clock || $clock === 'wall' ) { |
@@ -688,6 +688,9 @@ discard block |
||
688 | 688 | return $rootNode; |
689 | 689 | } |
690 | 690 | |
691 | + /** |
|
692 | + * @param string $text |
|
693 | + */ |
|
691 | 694 | private static function addLiteral( array &$accum, $text ) { |
692 | 695 | $n = count( $accum ); |
693 | 696 | if ( $n && is_string( $accum[$n - 1] ) ) { |
@@ -1133,7 +1136,6 @@ discard block |
||
1133 | 1136 | /** |
1134 | 1137 | * @param string $sep |
1135 | 1138 | * @param int $flags |
1136 | - * @param string|PPNode $args,... |
|
1137 | 1139 | * @return string |
1138 | 1140 | */ |
1139 | 1141 | public function implodeWithFlags( $sep, $flags /*, ... */ ) { |
@@ -1164,7 +1166,6 @@ discard block |
||
1164 | 1166 | * Implode with no flags specified |
1165 | 1167 | * This previously called implodeWithFlags but has now been inlined to reduce stack depth |
1166 | 1168 | * @param string $sep |
1167 | - * @param string|PPNode $args,... |
|
1168 | 1169 | * @return string |
1169 | 1170 | */ |
1170 | 1171 | public function implode( $sep /*, ... */ ) { |
@@ -1196,7 +1197,6 @@ discard block |
||
1196 | 1197 | * with implode() |
1197 | 1198 | * |
1198 | 1199 | * @param string $sep |
1199 | - * @param string|PPNode $args,... |
|
1200 | 1200 | * @return PPNode_Hash_Array |
1201 | 1201 | */ |
1202 | 1202 | public function virtualImplode( $sep /*, ... */ ) { |
@@ -1229,7 +1229,6 @@ discard block |
||
1229 | 1229 | * @param string $start |
1230 | 1230 | * @param string $sep |
1231 | 1231 | * @param string $end |
1232 | - * @param string|PPNode $args,... |
|
1233 | 1232 | * @return PPNode_Hash_Array |
1234 | 1233 | */ |
1235 | 1234 | public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) { |
@@ -1392,7 +1391,7 @@ discard block |
||
1392 | 1391 | |
1393 | 1392 | /** |
1394 | 1393 | * @param Preprocessor $preprocessor |
1395 | - * @param bool|PPFrame $parent |
|
1394 | + * @param PPFrame_Hash $parent |
|
1396 | 1395 | * @param array $numberedArgs |
1397 | 1396 | * @param array $namedArgs |
1398 | 1397 | * @param bool|Title $title |
@@ -1572,6 +1571,9 @@ discard block |
||
1572 | 1571 | |
1573 | 1572 | public $args; |
1574 | 1573 | |
1574 | + /** |
|
1575 | + * @param Preprocessor_Hash $preprocessor |
|
1576 | + */ |
|
1575 | 1577 | public function __construct( $preprocessor, $args ) { |
1576 | 1578 | parent::__construct( $preprocessor ); |
1577 | 1579 | $this->args = $args; |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | * objects or LinkCache entries. Uses $wgContentHandlerUseDB to determine |
366 | 366 | * whether to include page_content_model. |
367 | 367 | * |
368 | - * @return array |
|
368 | + * @return string[] |
|
369 | 369 | */ |
370 | 370 | protected static function getSelectFields() { |
371 | 371 | global $wgContentHandlerUseDB, $wgPageLanguageUseDB; |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | * Get the prefixed DB key associated with an ID |
559 | 559 | * |
560 | 560 | * @param int $id The page_id of the article |
561 | - * @return Title|null An object representing the article, or null if no such article was found |
|
561 | + * @return null|string An object representing the article, or null if no such article was found |
|
562 | 562 | */ |
563 | 563 | public static function nameOf( $id ) { |
564 | 564 | $dbr = wfGetDB( DB_SLAVE ); |
@@ -1079,7 +1079,6 @@ discard block |
||
1079 | 1079 | /** |
1080 | 1080 | * Returns true if the title is inside one of the specified namespaces. |
1081 | 1081 | * |
1082 | - * @param int $namespaces,... The namespaces to check for |
|
1083 | 1082 | * @return bool |
1084 | 1083 | * @since 1.19 |
1085 | 1084 | */ |
@@ -1889,7 +1888,7 @@ discard block |
||
1889 | 1888 | * - quick : does cheap permission checks from slaves (usable for GUI creation) |
1890 | 1889 | * - full : does cheap and expensive checks possibly from a slave |
1891 | 1890 | * - secure : does cheap and expensive checks, using the master as needed |
1892 | - * @param array $ignoreErrors Array of Strings Set this to a list of message keys |
|
1891 | + * @param string[] $ignoreErrors Array of Strings Set this to a list of message keys |
|
1893 | 1892 | * whose corresponding errors may be ignored. |
1894 | 1893 | * @return array Array of arrays of the arguments to wfMessage to explain permissions problems. |
1895 | 1894 | */ |
@@ -1990,7 +1989,7 @@ discard block |
||
1990 | 1989 | * Add the resulting error code to the errors array |
1991 | 1990 | * |
1992 | 1991 | * @param array $errors List of current errors |
1993 | - * @param array $result Result of errors |
|
1992 | + * @param string $result Result of errors |
|
1994 | 1993 | * |
1995 | 1994 | * @return array List of errors |
1996 | 1995 | */ |
@@ -2381,7 +2380,7 @@ discard block |
||
2381 | 2380 | * |
2382 | 2381 | * @param string $action The action to check |
2383 | 2382 | * @param bool $short Short circuit on first error |
2384 | - * @return array List of errors |
|
2383 | + * @return string[] List of errors |
|
2385 | 2384 | */ |
2386 | 2385 | private function missingPermissionError( $action, $short ) { |
2387 | 2386 | // We avoid expensive display logic for quickUserCan's and such |
@@ -3920,7 +3919,7 @@ discard block |
||
3920 | 3919 | * |
3921 | 3920 | * @param int $revId Revision ID. Get the revision that was before this one. |
3922 | 3921 | * @param int $flags Title::GAID_FOR_UPDATE |
3923 | - * @return int|bool Old revision ID, or false if none exists |
|
3922 | + * @return integer Old revision ID, or false if none exists |
|
3924 | 3923 | */ |
3925 | 3924 | public function getPreviousRevisionID( $revId, $flags = 0 ) { |
3926 | 3925 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
@@ -4060,8 +4059,8 @@ discard block |
||
4060 | 4059 | * Get the number of revisions between the given revision. |
4061 | 4060 | * Used for diffs and other things that really need it. |
4062 | 4061 | * |
4063 | - * @param int|Revision $old Old revision or rev ID (first before range) |
|
4064 | - * @param int|Revision $new New revision or rev ID (first after range) |
|
4062 | + * @param Revision $old Old revision or rev ID (first before range) |
|
4063 | + * @param Revision $new New revision or rev ID (first after range) |
|
4065 | 4064 | * @param int|null $max Limit of Revisions to count, will be incremented to detect truncations |
4066 | 4065 | * @return int Number of revisions between these revisions. |
4067 | 4066 | */ |
@@ -4173,9 +4172,9 @@ discard block |
||
4173 | 4172 | * Used for diffs and other things that really need it. |
4174 | 4173 | * |
4175 | 4174 | * @param int|Revision $old Old revision or rev ID (first before range by default) |
4176 | - * @param int|Revision $new New revision or rev ID (first after range by default) |
|
4175 | + * @param Revision $new New revision or rev ID (first after range by default) |
|
4177 | 4176 | * @param int $limit Maximum number of authors |
4178 | - * @param string|array $options (Optional): Single option, or an array of options: |
|
4177 | + * @param string $options (Optional): Single option, or an array of options: |
|
4179 | 4178 | * 'include_old' Include $old in the range; $new is excluded. |
4180 | 4179 | * 'include_new' Include $new in the range; $old is excluded. |
4181 | 4180 | * 'include_both' Include both $old and $new in the range. |
@@ -4331,7 +4330,7 @@ discard block |
||
4331 | 4330 | /** |
4332 | 4331 | * Get the default message text or false if the message doesn't exist |
4333 | 4332 | * |
4334 | - * @return string|bool |
|
4333 | + * @return false|string |
|
4335 | 4334 | */ |
4336 | 4335 | public function getDefaultMessageText() { |
4337 | 4336 | global $wgContLang; |
@@ -4778,7 +4777,7 @@ discard block |
||
4778 | 4777 | } |
4779 | 4778 | |
4780 | 4779 | /** |
4781 | - * @return array |
|
4780 | + * @return string[] |
|
4782 | 4781 | */ |
4783 | 4782 | public function __sleep() { |
4784 | 4783 | return [ |
@@ -113,6 +113,11 @@ |
||
113 | 113 | return $status; |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param string $lockSrv |
|
118 | + * |
|
119 | + * @return Status |
|
120 | + */ |
|
116 | 121 | abstract protected function doGetLocksOnServer( $lockSrv, array $paths, $type ); |
117 | 122 | |
118 | 123 | protected function freeLocksOnServer( $lockSrv, array $pathsByType ) { |
@@ -182,6 +182,9 @@ discard block |
||
182 | 182 | */ |
183 | 183 | const RECORD_LENGTH = 14; |
184 | 184 | |
185 | + /** |
|
186 | + * @param string $locale |
|
187 | + */ |
|
185 | 188 | public function __construct( $locale ) { |
186 | 189 | if ( !extension_loaded( 'intl' ) ) { |
187 | 190 | throw new MWException( 'An ICU collation was requested, ' . |
@@ -413,6 +416,8 @@ discard block |
||
413 | 416 | |
414 | 417 | /** |
415 | 418 | * @since 1.16.3 |
419 | + * @param integer $index |
|
420 | + * @return string |
|
416 | 421 | */ |
417 | 422 | public function getLetterByIndex( $index ) { |
418 | 423 | return $this->getFirstLetterData()['chars'][$index]; |
@@ -466,7 +471,7 @@ discard block |
||
466 | 471 | * currently in use, or false when it can't be determined. |
467 | 472 | * |
468 | 473 | * @since 1.21 |
469 | - * @return string|bool |
|
474 | + * @return false|string |
|
470 | 475 | */ |
471 | 476 | static function getUnicodeVersionForICU() { |
472 | 477 | $icuVersion = IcuCollation::getICUVersion(); |
@@ -30,6 +30,9 @@ |
||
30 | 30 | /** @var LocalFile */ |
31 | 31 | protected $lockFile; |
32 | 32 | |
33 | + /** |
|
34 | + * @param RevDelArchivedFileList $list |
|
35 | + */ |
|
33 | 36 | public function __construct( $list, $row ) { |
34 | 37 | RevDelItem::__construct( $list, $row ); |
35 | 38 | $this->file = ArchivedFile::newFromRow( $row ); |