@@ -167,7 +167,7 @@ |
||
167 | 167 | * Add an error and set OK to false, indicating that the operation |
168 | 168 | * as a whole was fatal |
169 | 169 | * |
170 | - * @param string|MessageSpecifier $message Message key or object |
|
170 | + * @param string $message Message key or object |
|
171 | 171 | */ |
172 | 172 | public function fatal( $message /*, parameters... */ ) { |
173 | 173 | $this->errors[] = [ |
@@ -53,7 +53,6 @@ discard block |
||
53 | 53 | * This function creates a 'increment' StatsdData object. |
54 | 54 | * |
55 | 55 | * @param string|array $key The metric(s) to increment. |
56 | - * @param float|1 $sampleRate The rate (0-1) for sampling. |
|
57 | 56 | * |
58 | 57 | * @return array |
59 | 58 | **/ |
@@ -66,7 +65,6 @@ discard block |
||
66 | 65 | * |
67 | 66 | * |
68 | 67 | * @param string|array $key The metric(s) to decrement. |
69 | - * @param float|1 $sampleRate The rate (0-1) for sampling. |
|
70 | 68 | * |
71 | 69 | * @return mixed |
72 | 70 | **/ |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * @since 1.16.3 |
44 | 44 | * @throws MWException |
45 | 45 | * @param string $collationName |
46 | - * @return Collation |
|
46 | + * @return string |
|
47 | 47 | */ |
48 | 48 | public static function factory( $collationName ) { |
49 | 49 | switch ( $collationName ) { |
@@ -167,6 +167,9 @@ discard block |
||
167 | 167 | */ |
168 | 168 | const RECORD_LENGTH = 14; |
169 | 169 | |
170 | + /** |
|
171 | + * @param string $locale |
|
172 | + */ |
|
170 | 173 | public function __construct( $locale ) { |
171 | 174 | if ( !extension_loaded( 'intl' ) ) { |
172 | 175 | throw new MWException( 'An ICU collation was requested, ' . |
@@ -388,6 +391,7 @@ discard block |
||
388 | 391 | |
389 | 392 | /** |
390 | 393 | * @since 1.16.3 |
394 | + * @param integer $index |
|
391 | 395 | */ |
392 | 396 | public function getLetterByIndex( $index ) { |
393 | 397 | if ( $this->firstLetterData === null ) { |
@@ -449,7 +453,7 @@ discard block |
||
449 | 453 | * currently in use, or false when it can't be determined. |
450 | 454 | * |
451 | 455 | * @since 1.21 |
452 | - * @return string|bool |
|
456 | + * @return false|string |
|
453 | 457 | */ |
454 | 458 | static function getUnicodeVersionForICU() { |
455 | 459 | $icuVersion = IcuCollation::getICUVersion(); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * instead. |
40 | 40 | * |
41 | 41 | * @param null $sitesTable IGNORED |
42 | - * @param null $cache IGNORED |
|
42 | + * @param null|BagOStuff $cache IGNORED |
|
43 | 43 | * |
44 | 44 | * @return SiteStore |
45 | 45 | */ |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | * one is set. |
431 | 431 | * |
432 | 432 | * @since 1.25 |
433 | - * @return bool|string |
|
433 | + * @return boolean |
|
434 | 434 | */ |
435 | 435 | public function getCanonicalUrl() { |
436 | 436 | return $this->mCanonicalUrl; |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | /** |
997 | 997 | * Replace the subtitle with $str |
998 | 998 | * |
999 | - * @param string|Message $str New value of the subtitle. String should be safe HTML. |
|
999 | + * @param string $str New value of the subtitle. String should be safe HTML. |
|
1000 | 1000 | */ |
1001 | 1001 | public function setSubtitle( $str ) { |
1002 | 1002 | $this->clearSubtitle(); |
@@ -1610,7 +1610,7 @@ discard block |
||
1610 | 1610 | * Get the timestamp of displayed revision. |
1611 | 1611 | * This will be null if not filled by setRevisionTimestamp(). |
1612 | 1612 | * |
1613 | - * @return string|null |
|
1613 | + * @return string |
|
1614 | 1614 | */ |
1615 | 1615 | public function getRevisionTimestamp() { |
1616 | 1616 | return $this->mRevisionTimestamp; |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | /** |
1620 | 1620 | * Set the displayed file version |
1621 | 1621 | * |
1622 | - * @param File|bool $file |
|
1622 | + * @param File $file |
|
1623 | 1623 | * @return mixed Previous value |
1624 | 1624 | */ |
1625 | 1625 | public function setFileVersion( $file ) { |
@@ -1965,7 +1965,7 @@ discard block |
||
1965 | 1965 | /** |
1966 | 1966 | * Get the list of cookies that will influence on the cache |
1967 | 1967 | * |
1968 | - * @return array |
|
1968 | + * @return string[] |
|
1969 | 1969 | */ |
1970 | 1970 | function getCacheVaryCookies() { |
1971 | 1971 | static $cookies; |
@@ -2342,7 +2342,7 @@ discard block |
||
2342 | 2342 | * indexing, clear the current text and redirect, set the page's title |
2343 | 2343 | * and optionally an custom HTML title (content of the "<title>" tag). |
2344 | 2344 | * |
2345 | - * @param string|Message $pageTitle Will be passed directly to setPageTitle() |
|
2345 | + * @param Message $pageTitle Will be passed directly to setPageTitle() |
|
2346 | 2346 | * @param string|Message $htmlTitle Will be passed directly to setHTMLTitle(); |
2347 | 2347 | * optional, if not passed the "<title>" attribute will be |
2348 | 2348 | * based on $pageTitle |
@@ -2368,8 +2368,8 @@ discard block |
||
2368 | 2368 | * showErrorPage( 'titlemsg', $messageObject ); |
2369 | 2369 | * showErrorPage( $titleMessageObject, $messageObject ); |
2370 | 2370 | * |
2371 | - * @param string|Message $title Message key (string) for page title, or a Message object |
|
2372 | - * @param string|Message $msg Message key (string) for page text, or a Message object |
|
2371 | + * @param string $title Message key (string) for page title, or a Message object |
|
2372 | + * @param string $msg Message key (string) for page text, or a Message object |
|
2373 | 2373 | * @param array $params Message parameters; ignored if $msg is a Message object |
2374 | 2374 | */ |
2375 | 2375 | public function showErrorPage( $title, $msg, $params = [] ) { |
@@ -2565,6 +2565,9 @@ discard block |
||
2565 | 2565 | } |
2566 | 2566 | } |
2567 | 2567 | |
2568 | + /** |
|
2569 | + * @param string $message |
|
2570 | + */ |
|
2568 | 2571 | public function showFatalError( $message ) { |
2569 | 2572 | $this->prepareErrorPage( $this->msg( 'internalerror' ) ); |
2570 | 2573 | |
@@ -2583,6 +2586,9 @@ discard block |
||
2583 | 2586 | $this->showFatalError( $this->msg( 'filerenameerror', $old, $new )->text() ); |
2584 | 2587 | } |
2585 | 2588 | |
2589 | + /** |
|
2590 | + * @param string $name |
|
2591 | + */ |
|
2586 | 2592 | public function showFileDeleteError( $name ) { |
2587 | 2593 | $this->showFatalError( $this->msg( 'filedeleteerror', $name )->text() ); |
2588 | 2594 | } |
@@ -2609,7 +2615,7 @@ discard block |
||
2609 | 2615 | * Add a "return to" link pointing to a specified title, |
2610 | 2616 | * or the title indicated in the request, or else the main page |
2611 | 2617 | * |
2612 | - * @param mixed $unused |
|
2618 | + * @param null|boolean $unused |
|
2613 | 2619 | * @param Title|string $returnto Title or String to return to |
2614 | 2620 | * @param string $returntoquery Query string for the return to link |
2615 | 2621 | */ |
@@ -3856,7 +3862,7 @@ discard block |
||
3856 | 3862 | * Caller is responsible for ensuring the file exists. Emits a PHP warning otherwise. |
3857 | 3863 | * |
3858 | 3864 | * @since 1.27 |
3859 | - * @param string $remotePath URL path prefix that points to $localPath |
|
3865 | + * @param string $remotePathPrefix URL path prefix that points to $localPath |
|
3860 | 3866 | * @param string $localPath File directory exposed at $remotePath |
3861 | 3867 | * @param string $file Path to target file relative to $localPath |
3862 | 3868 | * @return string URL |
@@ -235,7 +235,6 @@ discard block |
||
235 | 235 | * array( 'y' ) |
236 | 236 | * ) |
237 | 237 | * |
238 | - * @param array $array1,... |
|
239 | 238 | * @return array |
240 | 239 | */ |
241 | 240 | function wfMergeErrorArrays( /*...*/ ) { |
@@ -1287,7 +1286,7 @@ discard block |
||
1287 | 1286 | /** |
1288 | 1287 | * Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. |
1289 | 1288 | * |
1290 | - * @return string|bool String when in read-only mode; false otherwise |
|
1289 | + * @return string|false String when in read-only mode; false otherwise |
|
1291 | 1290 | * @since 1.27 |
1292 | 1291 | */ |
1293 | 1292 | function wfConfiguredReadOnlyReason() { |
@@ -1362,7 +1361,6 @@ discard block |
||
1362 | 1361 | * This function replaces all old wfMsg* functions. |
1363 | 1362 | * |
1364 | 1363 | * @param string|string[]|MessageSpecifier $key Message key, or array of keys, or a MessageSpecifier |
1365 | - * @param mixed $params,... Normal message parameters |
|
1366 | 1364 | * @return Message |
1367 | 1365 | * |
1368 | 1366 | * @since 1.17 |
@@ -1383,7 +1381,6 @@ discard block |
||
1383 | 1381 | * for the first message which is non-empty. If all messages are empty then an |
1384 | 1382 | * instance of the first message key is returned. |
1385 | 1383 | * |
1386 | - * @param string|string[] $keys,... Message keys |
|
1387 | 1384 | * @return Message |
1388 | 1385 | * |
1389 | 1386 | * @since 1.18 |
@@ -1614,7 +1611,7 @@ discard block |
||
1614 | 1611 | * @todo FIXME: We may want to blacklist some broken browsers |
1615 | 1612 | * |
1616 | 1613 | * @param bool $force |
1617 | - * @return bool Whereas client accept gzip compression |
|
1614 | + * @return null|boolean Whereas client accept gzip compression |
|
1618 | 1615 | */ |
1619 | 1616 | function wfClientAcceptsGzip( $force = false ) { |
1620 | 1617 | static $result = null; |
@@ -1750,7 +1747,7 @@ discard block |
||
1750 | 1747 | /** |
1751 | 1748 | * Provide a simple HTTP error. |
1752 | 1749 | * |
1753 | - * @param int|string $code |
|
1750 | + * @param integer $code |
|
1754 | 1751 | * @param string $label |
1755 | 1752 | * @param string $desc |
1756 | 1753 | */ |
@@ -2032,8 +2029,8 @@ discard block |
||
2032 | 2029 | * |
2033 | 2030 | * @param mixed $outputtype A timestamp in one of the supported formats, the |
2034 | 2031 | * function will autodetect which format is supplied and act accordingly. |
2035 | - * @param mixed $ts Optional timestamp to convert, default 0 for the current time |
|
2036 | - * @return string|bool String / false The same date in the format specified in $outputtype or false |
|
2032 | + * @param integer $ts Optional timestamp to convert, default 0 for the current time |
|
2033 | + * @return string|false String / false The same date in the format specified in $outputtype or false |
|
2037 | 2034 | */ |
2038 | 2035 | function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) { |
2039 | 2036 | try { |
@@ -2074,7 +2071,7 @@ discard block |
||
2074 | 2071 | /** |
2075 | 2072 | * Check if the operating system is Windows |
2076 | 2073 | * |
2077 | - * @return bool True if it's Windows, false otherwise. |
|
2074 | + * @return boolean|null True if it's Windows, false otherwise. |
|
2078 | 2075 | */ |
2079 | 2076 | function wfIsWindows() { |
2080 | 2077 | static $isWindows = null; |
@@ -2313,7 +2310,7 @@ discard block |
||
2313 | 2310 | /** |
2314 | 2311 | * Check if wfShellExec() is effectively disabled via php.ini config |
2315 | 2312 | * |
2316 | - * @return bool|string False or 'disabled' |
|
2313 | + * @return string|false False or 'disabled' |
|
2317 | 2314 | * @since 1.22 |
2318 | 2315 | */ |
2319 | 2316 | function wfShellExecDisabled() { |
@@ -2927,7 +2924,7 @@ discard block |
||
2927 | 2924 | * @param int $pad Minimum number of digits in the output (pad with zeroes) |
2928 | 2925 | * @param bool $lowercase Whether to output in lowercase or uppercase |
2929 | 2926 | * @param string $engine Either "gmp", "bcmath", or "php" |
2930 | - * @return string|bool The output number as a string, or false on error |
|
2927 | + * @return false|string The output number as a string, or false on error |
|
2931 | 2928 | */ |
2932 | 2929 | function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, |
2933 | 2930 | $lowercase = true, $engine = 'auto' |
@@ -3012,7 +3009,6 @@ discard block |
||
3012 | 3009 | /** |
3013 | 3010 | * Make a cache key for the local wiki. |
3014 | 3011 | * |
3015 | - * @param string $args,... |
|
3016 | 3012 | * @return string |
3017 | 3013 | */ |
3018 | 3014 | function wfMemcKey( /*...*/ ) { |
@@ -3029,7 +3025,6 @@ discard block |
||
3029 | 3025 | * |
3030 | 3026 | * @param string $db |
3031 | 3027 | * @param string $prefix |
3032 | - * @param string $args,... |
|
3033 | 3028 | * @return string |
3034 | 3029 | */ |
3035 | 3030 | function wfForeignMemcKey( $db, $prefix /*...*/ ) { |
@@ -3049,7 +3044,6 @@ discard block |
||
3049 | 3044 | * in the first segment will clash with wfMemcKey/wfForeignMemcKey. |
3050 | 3045 | * |
3051 | 3046 | * @since 1.26 |
3052 | - * @param string $args,... |
|
3053 | 3047 | * @return string |
3054 | 3048 | */ |
3055 | 3049 | function wfGlobalCacheKey( /*...*/ ) { |
@@ -3151,7 +3145,7 @@ discard block |
||
3151 | 3145 | * Returns a valid placeholder object if the file does not exist. |
3152 | 3146 | * |
3153 | 3147 | * @param Title|string $title |
3154 | - * @return LocalFile|null A File, or null if passed an invalid Title |
|
3148 | + * @return File|null A File, or null if passed an invalid Title |
|
3155 | 3149 | */ |
3156 | 3150 | function wfLocalFile( $title ) { |
3157 | 3151 | return RepoGroup::singleton()->getLocalRepo()->newFile( $title ); |
@@ -3355,7 +3349,7 @@ discard block |
||
3355 | 3349 | /** |
3356 | 3350 | * Set PHP's time limit to the larger of php.ini or $wgTransactionalTimeLimit |
3357 | 3351 | * |
3358 | - * @return int Prior time limit |
|
3352 | + * @return string Prior time limit |
|
3359 | 3353 | * @since 1.26 |
3360 | 3354 | */ |
3361 | 3355 | function wfTransactionalTimeLimit() { |
@@ -3491,7 +3485,7 @@ discard block |
||
3491 | 3485 | * |
3492 | 3486 | * @param string $format The format string (See php's docs) |
3493 | 3487 | * @param string $data A binary string of binary data |
3494 | - * @param int|bool $length The minimum length of $data or false. This is to |
|
3488 | + * @param integer $length The minimum length of $data or false. This is to |
|
3495 | 3489 | * prevent reading beyond the end of $data. false to disable the check. |
3496 | 3490 | * |
3497 | 3491 | * Also be careful when using this function to read unsigned 32 bit integer |
@@ -112,6 +112,9 @@ |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @return string |
|
117 | + */ |
|
115 | 118 | function stripParameters( $text ) { |
116 | 119 | if ( !$this->stripParametersEnabled ) { |
117 | 120 | return $text; |