@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * Get the file's last-modified timestamp |
74 | 74 | * |
75 | - * @return string|bool TS_MW timestamp or false on failure |
|
75 | + * @return false|string TS_MW timestamp or false on failure |
|
76 | 76 | */ |
77 | 77 | public function getTimestamp() { |
78 | 78 | MediaWiki\suppressWarnings(); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * fairly neatly. |
182 | 182 | * |
183 | 183 | * @param bool $recache |
184 | - * @return bool|string False on failure |
|
184 | + * @return string|false False on failure |
|
185 | 185 | */ |
186 | 186 | public function getSha1Base36( $recache = false ) { |
187 | 187 | if ( $this->sha1Base36 !== null && !$recache ) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * fairly neatly. |
234 | 234 | * |
235 | 235 | * @param string $path |
236 | - * @return bool|string False on failure |
|
236 | + * @return string|false False on failure |
|
237 | 237 | */ |
238 | 238 | public static function getSha1Base36FromPath( $path ) { |
239 | 239 | $fsFile = new self( $path ); |
@@ -34,6 +34,9 @@ |
||
34 | 34 | /** @var array Map of (path => 1) for paths to delete on shutdown */ |
35 | 35 | protected static $pathsCollect = null; |
36 | 36 | |
37 | + /** |
|
38 | + * @param false|string $path |
|
39 | + */ |
|
37 | 40 | public function __construct( $path ) { |
38 | 41 | parent::__construct( $path ); |
39 | 42 |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * |
300 | 300 | * @param string $host |
301 | 301 | * @param int $port |
302 | - * @param bool|int $defaultPort |
|
302 | + * @param integer $defaultPort |
|
303 | 303 | * @return string |
304 | 304 | */ |
305 | 305 | public static function combineHostAndPort( $host, $port, $defaultPort = false ) { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * hexadecimal string which sorts after the IPv4 addresses. |
403 | 403 | * |
404 | 404 | * @param string $ip Quad dotted/octet IP address. |
405 | - * @return string|bool False on failure |
|
405 | + * @return string|false False on failure |
|
406 | 406 | */ |
407 | 407 | public static function toHex( $ip ) { |
408 | 408 | if ( self::isIPv6( $ip ) ) { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | * Given an IPv6 address in octet notation, returns a pure hex string. |
436 | 436 | * |
437 | 437 | * @param string $ip Octet ipv6 IP address. |
438 | - * @return string|bool Pure hex (uppercase); false on failure |
|
438 | + * @return false|string Pure hex (uppercase); false on failure |
|
439 | 439 | */ |
440 | 440 | private static function IPv6ToRawHex( $ip ) { |
441 | 441 | $ip = self::sanitizeIP( $ip ); |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | * Filter the options used in SELECT statements |
555 | 555 | * |
556 | 556 | * @param array $options |
557 | - * @return array |
|
557 | + * @return string[] |
|
558 | 558 | */ |
559 | 559 | function makeSelectOptions( $options ) { |
560 | 560 | foreach ( $options as $k => $v ) { |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | |
785 | 785 | /** |
786 | 786 | * @param string|int|null|bool|Blob $s |
787 | - * @return string|int |
|
787 | + * @return string |
|
788 | 788 | */ |
789 | 789 | function addQuotes( $s ) { |
790 | 790 | if ( $s instanceof Blob ) { |
@@ -35,6 +35,7 @@ |
||
35 | 35 | * The sample rate specified in a StatsdData entity overrides the sample rate specified here. |
36 | 36 | * |
37 | 37 | * {@inheritDoc} |
38 | + * @return StatsdDataInterface[] |
|
38 | 39 | */ |
39 | 40 | public function appendSampleRate( $data, $sampleRate = 1 ) { |
40 | 41 | if ( $sampleRate < 1 ) { |
@@ -417,6 +417,9 @@ discard block |
||
417 | 417 | return $this->mEnableOOUI; |
418 | 418 | } |
419 | 419 | |
420 | + /** |
|
421 | + * @param string $text |
|
422 | + */ |
|
420 | 423 | public function setText( $text ) { |
421 | 424 | return wfSetVar( $this->mText, $text ); |
422 | 425 | } |
@@ -437,32 +440,52 @@ discard block |
||
437 | 440 | return wfSetVar( $this->mSections, $toc ); |
438 | 441 | } |
439 | 442 | |
443 | + /** |
|
444 | + * @param boolean $t |
|
445 | + */ |
|
440 | 446 | public function setEditSectionTokens( $t ) { |
441 | 447 | return wfSetVar( $this->mEditSectionTokens, $t ); |
442 | 448 | } |
443 | 449 | |
450 | + /** |
|
451 | + * @param string $policy |
|
452 | + */ |
|
444 | 453 | public function setIndexPolicy( $policy ) { |
445 | 454 | return wfSetVar( $this->mIndexPolicy, $policy ); |
446 | 455 | } |
447 | 456 | |
457 | + /** |
|
458 | + * @param string $tochtml |
|
459 | + */ |
|
448 | 460 | public function setTOCHTML( $tochtml ) { |
449 | 461 | return wfSetVar( $this->mTOCHTML, $tochtml ); |
450 | 462 | } |
451 | 463 | |
464 | + /** |
|
465 | + * @param false|string $timestamp |
|
466 | + */ |
|
452 | 467 | public function setTimestamp( $timestamp ) { |
453 | 468 | return wfSetVar( $this->mTimestamp, $timestamp ); |
454 | 469 | } |
455 | 470 | |
471 | + /** |
|
472 | + * @param boolean $flag |
|
473 | + */ |
|
456 | 474 | public function setTOCEnabled( $flag ) { |
457 | 475 | return wfSetVar( $this->mTOCEnabled, $flag ); |
458 | 476 | } |
459 | 477 | |
478 | + /** |
|
479 | + * @param string $c |
|
480 | + */ |
|
460 | 481 | public function addCategory( $c, $sort ) { |
461 | 482 | $this->mCategories[$c] = $sort; |
462 | 483 | } |
463 | 484 | |
464 | 485 | /** |
465 | 486 | * @since 1.25 |
487 | + * @param string $id |
|
488 | + * @param string $content |
|
466 | 489 | */ |
467 | 490 | public function setIndicator( $id, $content ) { |
468 | 491 | $this->mIndicators[$id] = $content; |
@@ -479,10 +502,16 @@ discard block |
||
479 | 502 | $this->mEnableOOUI = $enable; |
480 | 503 | } |
481 | 504 | |
505 | + /** |
|
506 | + * @param string $t |
|
507 | + */ |
|
482 | 508 | public function addLanguageLink( $t ) { |
483 | 509 | $this->mLanguageLinks[] = $t; |
484 | 510 | } |
485 | 511 | |
512 | + /** |
|
513 | + * @param string $s |
|
514 | + */ |
|
486 | 515 | public function addWarning( $s ) { |
487 | 516 | $this->mWarnings[$s] = 1; |
488 | 517 | } |
@@ -491,9 +520,16 @@ discard block |
||
491 | 520 | $this->mOutputHooks[] = [ $hook, $data ]; |
492 | 521 | } |
493 | 522 | |
523 | + /** |
|
524 | + * @param boolean $value |
|
525 | + */ |
|
494 | 526 | public function setNewSection( $value ) { |
495 | 527 | $this->mNewSection = (bool)$value; |
496 | 528 | } |
529 | + |
|
530 | + /** |
|
531 | + * @param boolean $value |
|
532 | + */ |
|
497 | 533 | public function hideNewSection( $value ) { |
498 | 534 | $this->mHideNewSection = (bool)$value; |
499 | 535 | } |
@@ -822,6 +858,8 @@ discard block |
||
822 | 858 | * $parser->getOutput()->my_ext_foo = '...'; |
823 | 859 | * @endcode |
824 | 860 | * |
861 | + * @param string $name |
|
862 | + * @param string $value |
|
825 | 863 | */ |
826 | 864 | public function setProperty( $name, $value ) { |
827 | 865 | $this->mProperties[$name] = $value; |
@@ -830,7 +868,7 @@ discard block |
||
830 | 868 | /** |
831 | 869 | * @param string $name The property name to look up. |
832 | 870 | * |
833 | - * @return mixed|bool The value previously set using setProperty(). False if null or no value |
|
871 | + * @return string The value previously set using setProperty(). False if null or no value |
|
834 | 872 | * was set for the given property name. |
835 | 873 | * |
836 | 874 | * @note You need to use getProperties() to check for boolean and null properties. |
@@ -945,6 +983,9 @@ discard block |
||
945 | 983 | return null; |
946 | 984 | } |
947 | 985 | |
986 | + /** |
|
987 | + * @param string $clock |
|
988 | + */ |
|
948 | 989 | private static function getTimes( $clock = null ) { |
949 | 990 | $ret = []; |
950 | 991 | if ( !$clock || $clock === 'wall' ) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * Get the internal type name of this list. Equal to the table name. |
59 | 59 | * Override this function. |
60 | - * @return null |
|
60 | + * @return string |
|
61 | 61 | */ |
62 | 62 | public function getType() { |
63 | 63 | return null; |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | /** |
230 | 230 | * Get the timestamp in MW 14-char form |
231 | - * @return mixed |
|
231 | + * @return false|string |
|
232 | 232 | */ |
233 | 233 | public function getTimestamp() { |
234 | 234 | $field = $this->getTimestampField(); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | |
111 | 111 | /** |
112 | 112 | * @param MWRestrictions $value |
113 | - * @return string |
|
113 | + * @return OOUI\TextInputWidget |
|
114 | 114 | */ |
115 | 115 | public function getInputOOUI( $value ) { |
116 | 116 | if ( $value instanceof MWRestrictions ) { |
@@ -55,6 +55,9 @@ |
||
55 | 55 | ) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) ); |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param string $value |
|
60 | + */ |
|
58 | 61 | function formatOptions( $options, $value ) { |
59 | 62 | $html = ''; |
60 | 63 |