@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * @param string $uuid 32 char hex string |
315 | 315 | * @param int $rand Random unsigned integer (31 bits) |
316 | 316 | * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random) |
317 | - * @return stdClass|bool Row|false |
|
317 | + * @return Title Row|false |
|
318 | 318 | */ |
319 | 319 | protected function claimRandom( $uuid, $rand, $gte ) { |
320 | 320 | $dbw = $this->getMasterDB(); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | * Reserve a row with a single UPDATE without holding row locks over RTTs... |
392 | 392 | * |
393 | 393 | * @param string $uuid 32 char hex string |
394 | - * @return stdClass|bool Row|false |
|
394 | + * @return Title Row|false |
|
395 | 395 | */ |
396 | 396 | protected function claimOldest( $uuid ) { |
397 | 397 | $dbw = $this->getMasterDB(); |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | |
546 | 546 | /** |
547 | 547 | * @see JobQueue::getAllQueuedJobs() |
548 | - * @return Iterator |
|
548 | + * @return MappedIterator|null |
|
549 | 549 | */ |
550 | 550 | public function getAllQueuedJobs() { |
551 | 551 | return $this->getJobIterator( [ 'job_cmd' => $this->getType(), 'job_token' => '' ] ); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | |
554 | 554 | /** |
555 | 555 | * @see JobQueue::getAllAcquiredJobs() |
556 | - * @return Iterator |
|
556 | + * @return MappedIterator|null |
|
557 | 557 | */ |
558 | 558 | public function getAllAcquiredJobs() { |
559 | 559 | return $this->getJobIterator( [ 'job_cmd' => $this->getType(), "job_token > ''" ] ); |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | |
562 | 562 | /** |
563 | 563 | * @param array $conds Query conditions |
564 | - * @return Iterator |
|
564 | + * @return MappedIterator|null |
|
565 | 565 | */ |
566 | 566 | protected function getJobIterator( array $conds ) { |
567 | 567 | $dbr = $this->getSlaveDB(); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | /** |
814 | 814 | * Return the list of job fields that should be selected. |
815 | 815 | * @since 1.23 |
816 | - * @return array |
|
816 | + * @return string[] |
|
817 | 817 | */ |
818 | 818 | public static function selectFields() { |
819 | 819 | return [ |
@@ -289,7 +289,7 @@ |
||
289 | 289 | * @param string $table Table name |
290 | 290 | * @param string $field Field name to check |
291 | 291 | * @param string $patchFile Path to the patch to correct the field |
292 | - * @return bool |
|
292 | + * @return boolean|null |
|
293 | 293 | */ |
294 | 294 | protected function checkBin( $table, $field, $patchFile ) { |
295 | 295 | if ( !$this->doTable( $table ) ) { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * @return array |
|
88 | + * @return string[] |
|
89 | 89 | */ |
90 | 90 | function getOrderFields() { |
91 | 91 | return array( 'rd_namespace', 'rd_title', 'rd_from' ); |
@@ -423,7 +423,7 @@ |
||
423 | 423 | * Returns a sentence describing the log action. Usually |
424 | 424 | * a Message object is returned, but old style log types |
425 | 425 | * and entries might return pre-escaped HTML string. |
426 | - * @return Message|string Pre-escaped HTML |
|
426 | + * @return string Pre-escaped HTML |
|
427 | 427 | */ |
428 | 428 | protected function getActionMessage() { |
429 | 429 | $message = $this->msg( $this->getMessageKey() ); |
@@ -371,6 +371,9 @@ |
||
371 | 371 | return 'djvuxml'; |
372 | 372 | } |
373 | 373 | |
374 | + /** |
|
375 | + * @param File $image |
|
376 | + */ |
|
374 | 377 | function isMetadataValid( $image, $metadata ) { |
375 | 378 | return !empty( $metadata ) && $metadata != serialize( [] ); |
376 | 379 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * Get the final extension of the thumbnail. |
82 | 82 | * Returns false for scripted transformations. |
83 | - * @return string|bool |
|
83 | + * @return string|false |
|
84 | 84 | */ |
85 | 85 | public function getExtension() { |
86 | 86 | return $this->path ? FileBackend::extensionFromPath( $this->path ) : false; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * |
215 | 215 | * @deprecated since 1.26, use streamFileWithStatus |
216 | 216 | * @param array $headers Additional HTTP headers to send on success |
217 | - * @return bool Success |
|
217 | + * @return boolean|null Success |
|
218 | 218 | */ |
219 | 219 | public function streamFile( $headers = [] ) { |
220 | 220 | $this->streamFileWithStatus( $headers )->isOK(); |
@@ -445,6 +445,9 @@ discard block |
||
445 | 445 | /** @var string Plain text formatted version of the error */ |
446 | 446 | private $textMsg; |
447 | 447 | |
448 | + /** |
|
449 | + * @param string $msg |
|
450 | + */ |
|
448 | 451 | function __construct( $msg, $width, $height /*, ... */ ) { |
449 | 452 | $args = array_slice( func_get_args(), 3 ); |
450 | 453 | $htmlArgs = array_map( 'htmlspecialchars', $args ); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | * @note Code that wants to retrieve page content from the database should |
354 | 354 | * use WikiPage::getContent(). |
355 | 355 | * |
356 | - * @return Content|null|bool |
|
356 | + * @return null|Content |
|
357 | 357 | * |
358 | 358 | * @since 1.21 |
359 | 359 | */ |
@@ -1529,7 +1529,7 @@ discard block |
||
1529 | 1529 | * Chances are you should just be using the ParserOutput from |
1530 | 1530 | * WikitextContent::getParserOutput instead of calling this for redirects. |
1531 | 1531 | * |
1532 | - * @param Title|array $target Destination(s) to redirect |
|
1532 | + * @param Title $target Destination(s) to redirect |
|
1533 | 1533 | * @param bool $appendSubtitle [optional] |
1534 | 1534 | * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? |
1535 | 1535 | * @return string Containing HTML with redirect link |
@@ -2648,7 +2648,7 @@ discard block |
||
2648 | 2648 | * @param string $reason |
2649 | 2649 | * @param int $cascade |
2650 | 2650 | * @param array $expiry |
2651 | - * @return bool |
|
2651 | + * @return Status |
|
2652 | 2652 | */ |
2653 | 2653 | public function updateRestrictions( $limit = [], $reason = '', |
2654 | 2654 | &$cascade = 0, $expiry = [] |
@@ -2705,7 +2705,7 @@ discard block |
||
2705 | 2705 | |
2706 | 2706 | /** |
2707 | 2707 | * @param bool $hasHistory |
2708 | - * @return mixed |
|
2708 | + * @return false|string |
|
2709 | 2709 | */ |
2710 | 2710 | public function generateReason( &$hasHistory ) { |
2711 | 2711 | $title = $this->mPage->getTitle(); |
@@ -2714,7 +2714,7 @@ discard block |
||
2714 | 2714 | } |
2715 | 2715 | |
2716 | 2716 | /** |
2717 | - * @return array |
|
2717 | + * @return string[] |
|
2718 | 2718 | * |
2719 | 2719 | * @deprecated since 1.24, use WikiPage::selectFields() instead |
2720 | 2720 | */ |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | * @since 1.25 |
616 | 616 | * |
617 | 617 | * @param string $text Text extension wants to have parsed |
618 | - * @param bool|PPFrame $frame The frame to use for expanding any template variables |
|
618 | + * @param PPFrame $frame The frame to use for expanding any template variables |
|
619 | 619 | * @return string Fully parsed HTML |
620 | 620 | */ |
621 | 621 | public function recursiveTagParseFully( $text, $frame = false ) { |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | * @param ParserOptions $options |
634 | 634 | * @param int|null $revid |
635 | 635 | * @param bool|PPFrame $frame |
636 | - * @return mixed|string |
|
636 | + * @return string |
|
637 | 637 | */ |
638 | 638 | public function preprocess( $text, Title $title = null, |
639 | 639 | ParserOptions $options, $revid = null, $frame = false |
@@ -1969,6 +1969,10 @@ discard block |
||
1969 | 1969 | return $ret; |
1970 | 1970 | } |
1971 | 1971 | |
1972 | + /** |
|
1973 | + * @param string $component |
|
1974 | + * @param string $unsafe |
|
1975 | + */ |
|
1972 | 1976 | private static function normalizeUrlComponent( $component, $unsafe ) { |
1973 | 1977 | $callback = function ( $matches ) use ( $unsafe ) { |
1974 | 1978 | $char = urldecode( $matches[0] ); |
@@ -2420,6 +2424,7 @@ discard block |
||
2420 | 2424 | * |
2421 | 2425 | * @param string $target The source of the link |
2422 | 2426 | * @param string &$text The link text, modified as necessary |
2427 | + * @param string $text |
|
2423 | 2428 | * @return string The full name of the link |
2424 | 2429 | * @private |
2425 | 2430 | */ |
@@ -2445,7 +2450,7 @@ discard block |
||
2445 | 2450 | * @private |
2446 | 2451 | * |
2447 | 2452 | * @param int $index |
2448 | - * @param bool|PPFrame $frame |
|
2453 | + * @param PPFrame $frame |
|
2449 | 2454 | * |
2450 | 2455 | * @throws MWException |
2451 | 2456 | * @return string |
@@ -2842,7 +2847,7 @@ discard block |
||
2842 | 2847 | * |
2843 | 2848 | * @param string $s |
2844 | 2849 | * |
2845 | - * @return array |
|
2850 | + * @return string[] |
|
2846 | 2851 | */ |
2847 | 2852 | public static function splitWhitespace( $s ) { |
2848 | 2853 | $ltrimmed = ltrim( $s ); |
@@ -2950,7 +2955,7 @@ discard block |
||
2950 | 2955 | * 'expansion-depth-exceeded' (corresponding messages: |
2951 | 2956 | * 'expansion-depth-exceeded-warning', |
2952 | 2957 | * 'expansion-depth-exceeded-category') |
2953 | - * @param string|int|null $current Current value |
|
2958 | + * @param integer $current Current value |
|
2954 | 2959 | * @param string|int|null $max Maximum allowed, when an explicit limit has been |
2955 | 2960 | * exceeded, provide the values (optional) |
2956 | 2961 | */ |
@@ -3954,7 +3959,7 @@ discard block |
||
3954 | 3959 | * @param string $text |
3955 | 3960 | * @param string $origText Original, untouched wikitext |
3956 | 3961 | * @param bool $isMain |
3957 | - * @return mixed|string |
|
3962 | + * @return string |
|
3958 | 3963 | * @private |
3959 | 3964 | */ |
3960 | 3965 | public function formatHeadings( $text, $origText, $isMain = true ) { |
@@ -4525,7 +4530,7 @@ discard block |
||
4525 | 4530 | * Check that the user's signature contains no bad XML |
4526 | 4531 | * |
4527 | 4532 | * @param string $text |
4528 | - * @return string|bool An expanded string, or false if invalid. |
|
4533 | + * @return string|false An expanded string, or false if invalid. |
|
4529 | 4534 | */ |
4530 | 4535 | public function validateSig( $text ) { |
4531 | 4536 | return Xml::isWellFormedXmlFragment( $text ) ? $text : false; |
@@ -5067,7 +5072,7 @@ discard block |
||
5067 | 5072 | * |
5068 | 5073 | * @param Title $title |
5069 | 5074 | * @param string $options |
5070 | - * @param LinkHolderArray|bool $holders |
|
5075 | + * @param LinkHolderArray $holders |
|
5071 | 5076 | * @return string HTML |
5072 | 5077 | */ |
5073 | 5078 | public function makeImage( $title, $options, $holders = false ) { |
@@ -5283,7 +5288,7 @@ discard block |
||
5283 | 5288 | /** |
5284 | 5289 | * @param string $caption |
5285 | 5290 | * @param LinkHolderArray|bool $holders |
5286 | - * @return mixed|string |
|
5291 | + * @return string |
|
5287 | 5292 | */ |
5288 | 5293 | protected function stripAltText( $caption, $holders ) { |
5289 | 5294 | # Strip bad stuff out of the title (tooltip). We can't just use |
@@ -5686,7 +5691,7 @@ discard block |
||
5686 | 5691 | * Accessor for $mDefaultSort |
5687 | 5692 | * Unlike getDefaultSort(), will return false if none is set |
5688 | 5693 | * |
5689 | - * @return string|bool |
|
5694 | + * @return false|string |
|
5690 | 5695 | */ |
5691 | 5696 | public function getCustomDefaultSort() { |
5692 | 5697 | return $this->mDefaultSort; |
@@ -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' ) { |