@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | protected $repoClass = 'ForeignApiRepo'; |
37 | 37 | |
38 | 38 | /** |
39 | - * @param Title|string|bool $title |
|
39 | + * @param Title|null $title |
|
40 | 40 | * @param ForeignApiRepo $repo |
41 | 41 | * @param array $info |
42 | 42 | * @param bool $exists |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
172 | - * @return bool|null|string |
|
172 | + * @return string|null |
|
173 | 173 | */ |
174 | 174 | public function getMetadata() { |
175 | 175 | if ( isset( $this->mInfo['metadata'] ) ) { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
211 | - * @return bool|int|null |
|
211 | + * @return integer|null |
|
212 | 212 | */ |
213 | 213 | public function getSize() { |
214 | 214 | return isset( $this->mInfo['size'] ) ? intval( $this->mInfo['size'] ) : null; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
274 | - * @return bool|string |
|
274 | + * @return false|string |
|
275 | 275 | */ |
276 | 276 | function getTimestamp() { |
277 | 277 | return wfTimestamp( TS_MW, |
@@ -234,7 +234,6 @@ discard block |
||
234 | 234 | * [ 'y' ] |
235 | 235 | * ] |
236 | 236 | * |
237 | - * @param array $array1,... |
|
238 | 237 | * @return array |
239 | 238 | */ |
240 | 239 | function wfMergeErrorArrays( /*...*/ ) { |
@@ -261,8 +260,8 @@ discard block |
||
261 | 260 | * |
262 | 261 | * @param array $array The array. |
263 | 262 | * @param array $insert The array to insert. |
264 | - * @param mixed $after The key to insert after |
|
265 | - * @return array |
|
263 | + * @param string $after The key to insert after |
|
264 | + * @return string[] |
|
266 | 265 | */ |
267 | 266 | function wfArrayInsertAfter( array $array, array $insert, $after ) { |
268 | 267 | // Find the offset of the element to insert after. |
@@ -1301,7 +1300,7 @@ discard block |
||
1301 | 1300 | /** |
1302 | 1301 | * Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. |
1303 | 1302 | * |
1304 | - * @return string|bool String when in read-only mode; false otherwise |
|
1303 | + * @return string|false String when in read-only mode; false otherwise |
|
1305 | 1304 | * @since 1.27 |
1306 | 1305 | */ |
1307 | 1306 | function wfConfiguredReadOnlyReason() { |
@@ -1376,7 +1375,6 @@ discard block |
||
1376 | 1375 | * This function replaces all old wfMsg* functions. |
1377 | 1376 | * |
1378 | 1377 | * @param string|string[]|MessageSpecifier $key Message key, or array of keys, or a MessageSpecifier |
1379 | - * @param mixed $params,... Normal message parameters |
|
1380 | 1378 | * @return Message |
1381 | 1379 | * |
1382 | 1380 | * @since 1.17 |
@@ -1397,7 +1395,6 @@ discard block |
||
1397 | 1395 | * for the first message which is non-empty. If all messages are empty then an |
1398 | 1396 | * instance of the first message key is returned. |
1399 | 1397 | * |
1400 | - * @param string|string[] $keys,... Message keys |
|
1401 | 1398 | * @return Message |
1402 | 1399 | * |
1403 | 1400 | * @since 1.18 |
@@ -1628,7 +1625,7 @@ discard block |
||
1628 | 1625 | * @todo FIXME: We may want to blacklist some broken browsers |
1629 | 1626 | * |
1630 | 1627 | * @param bool $force |
1631 | - * @return bool Whereas client accept gzip compression |
|
1628 | + * @return null|boolean Whereas client accept gzip compression |
|
1632 | 1629 | */ |
1633 | 1630 | function wfClientAcceptsGzip( $force = false ) { |
1634 | 1631 | static $result = null; |
@@ -1716,7 +1713,7 @@ discard block |
||
1716 | 1713 | * @param mixed $dest |
1717 | 1714 | * @param mixed $source |
1718 | 1715 | * @param bool $force |
1719 | - * @return mixed |
|
1716 | + * @return string |
|
1720 | 1717 | */ |
1721 | 1718 | function wfSetVar( &$dest, $source, $force = false ) { |
1722 | 1719 | $temp = $dest; |
@@ -1766,7 +1763,7 @@ discard block |
||
1766 | 1763 | /** |
1767 | 1764 | * Provide a simple HTTP error. |
1768 | 1765 | * |
1769 | - * @param int|string $code |
|
1766 | + * @param integer $code |
|
1770 | 1767 | * @param string $label |
1771 | 1768 | * @param string $desc |
1772 | 1769 | */ |
@@ -1999,8 +1996,8 @@ discard block |
||
1999 | 1996 | * |
2000 | 1997 | * @param mixed $outputtype A timestamp in one of the supported formats, the |
2001 | 1998 | * function will autodetect which format is supplied and act accordingly. |
2002 | - * @param mixed $ts Optional timestamp to convert, default 0 for the current time |
|
2003 | - * @return string|bool String / false The same date in the format specified in $outputtype or false |
|
1999 | + * @param integer $ts Optional timestamp to convert, default 0 for the current time |
|
2000 | + * @return false|string String / false The same date in the format specified in $outputtype or false |
|
2004 | 2001 | */ |
2005 | 2002 | function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) { |
2006 | 2003 | $ret = MWTimestamp::convert( $outputtype, $ts ); |
@@ -2039,7 +2036,7 @@ discard block |
||
2039 | 2036 | /** |
2040 | 2037 | * Check if the operating system is Windows |
2041 | 2038 | * |
2042 | - * @return bool True if it's Windows, false otherwise. |
|
2039 | + * @return boolean|null True if it's Windows, false otherwise. |
|
2043 | 2040 | */ |
2044 | 2041 | function wfIsWindows() { |
2045 | 2042 | static $isWindows = null; |
@@ -2268,7 +2265,7 @@ discard block |
||
2268 | 2265 | /** |
2269 | 2266 | * Check if wfShellExec() is effectively disabled via php.ini config |
2270 | 2267 | * |
2271 | - * @return bool|string False or 'disabled' |
|
2268 | + * @return string|false False or 'disabled' |
|
2272 | 2269 | * @since 1.22 |
2273 | 2270 | */ |
2274 | 2271 | function wfShellExecDisabled() { |
@@ -2882,7 +2879,7 @@ discard block |
||
2882 | 2879 | * @param int $pad Minimum number of digits in the output (pad with zeroes) |
2883 | 2880 | * @param bool $lowercase Whether to output in lowercase or uppercase |
2884 | 2881 | * @param string $engine Either "gmp", "bcmath", or "php" |
2885 | - * @return string|bool The output number as a string, or false on error |
|
2882 | + * @return false|string The output number as a string, or false on error |
|
2886 | 2883 | */ |
2887 | 2884 | function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, |
2888 | 2885 | $lowercase = true, $engine = 'auto' |
@@ -2967,7 +2964,6 @@ discard block |
||
2967 | 2964 | /** |
2968 | 2965 | * Make a cache key for the local wiki. |
2969 | 2966 | * |
2970 | - * @param string $args,... |
|
2971 | 2967 | * @return string |
2972 | 2968 | */ |
2973 | 2969 | function wfMemcKey( /*...*/ ) { |
@@ -2984,7 +2980,6 @@ discard block |
||
2984 | 2980 | * |
2985 | 2981 | * @param string $db |
2986 | 2982 | * @param string $prefix |
2987 | - * @param string $args,... |
|
2988 | 2983 | * @return string |
2989 | 2984 | */ |
2990 | 2985 | function wfForeignMemcKey( $db, $prefix /*...*/ ) { |
@@ -3004,7 +2999,6 @@ discard block |
||
3004 | 2999 | * in the first segment will clash with wfMemcKey/wfForeignMemcKey. |
3005 | 3000 | * |
3006 | 3001 | * @since 1.26 |
3007 | - * @param string $args,... |
|
3008 | 3002 | * @return string |
3009 | 3003 | */ |
3010 | 3004 | function wfGlobalCacheKey( /*...*/ ) { |
@@ -3119,7 +3113,7 @@ discard block |
||
3119 | 3113 | * Returns a valid placeholder object if the file does not exist. |
3120 | 3114 | * |
3121 | 3115 | * @param Title|string $title |
3122 | - * @return LocalFile|null A File, or null if passed an invalid Title |
|
3116 | + * @return File|null A File, or null if passed an invalid Title |
|
3123 | 3117 | */ |
3124 | 3118 | function wfLocalFile( $title ) { |
3125 | 3119 | return RepoGroup::singleton()->getLocalRepo()->newFile( $title ); |
@@ -3324,7 +3318,7 @@ discard block |
||
3324 | 3318 | /** |
3325 | 3319 | * Set PHP's time limit to the larger of php.ini or $wgTransactionalTimeLimit |
3326 | 3320 | * |
3327 | - * @return int Prior time limit |
|
3321 | + * @return string Prior time limit |
|
3328 | 3322 | * @since 1.26 |
3329 | 3323 | */ |
3330 | 3324 | function wfTransactionalTimeLimit() { |
@@ -3460,7 +3454,7 @@ discard block |
||
3460 | 3454 | * |
3461 | 3455 | * @param string $format The format string (See php's docs) |
3462 | 3456 | * @param string $data A binary string of binary data |
3463 | - * @param int|bool $length The minimum length of $data or false. This is to |
|
3457 | + * @param integer $length The minimum length of $data or false. This is to |
|
3464 | 3458 | * prevent reading beyond the end of $data. false to disable the check. |
3465 | 3459 | * |
3466 | 3460 | * Also be careful when using this function to read unsigned 32 bit integer |
@@ -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(); |