@@ -202,6 +202,9 @@ |
||
| 202 | 202 | return $protocols; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | + /** |
|
| 206 | + * @return string|null |
|
| 207 | + */ |
|
| 205 | 208 | public static function getProtocolPrefix( $protocol ) { |
| 206 | 209 | // Find the right prefix |
| 207 | 210 | global $wgUrlProtocols; |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | * |
| 470 | 470 | * @since 1.25 |
| 471 | 471 | * @param array &$arr To add $value to |
| 472 | - * @param string|int $name Index of $arr to add $value at. |
|
| 472 | + * @param string $name Index of $arr to add $value at. |
|
| 473 | 473 | * @param mixed $value |
| 474 | 474 | * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. |
| 475 | 475 | */ |
@@ -486,10 +486,10 @@ discard block |
||
| 486 | 486 | * |
| 487 | 487 | * @since 1.25 |
| 488 | 488 | * @param array|string|null $path See ApiResult::addValue() |
| 489 | - * @param string|int $name See ApiResult::setValue() |
|
| 489 | + * @param string $name See ApiResult::setValue() |
|
| 490 | 490 | * @param mixed $value |
| 491 | 491 | * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. |
| 492 | - * @return bool True if $value fits in the result, false if not |
|
| 492 | + * @return boolean|null True if $value fits in the result, false if not |
|
| 493 | 493 | */ |
| 494 | 494 | public function addContentValue( $path, $name, $value, $flags = 0 ) { |
| 495 | 495 | if ( $name === null ) { |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | * subelements rather than attributes. |
| 574 | 574 | * @since 1.25 |
| 575 | 575 | * @param array|string|null $path See ApiResult::addValue() |
| 576 | - * @param array|string|int $names The element name(s) to be output as subelements |
|
| 576 | + * @param string $names The element name(s) to be output as subelements |
|
| 577 | 577 | */ |
| 578 | 578 | public function addSubelementsList( $path, $names ) { |
| 579 | 579 | $arr = &$this->path( $path ); |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | * @param WikiPage $page |
| 129 | 129 | * @param Content $content |
| 130 | 130 | * @param User $user |
| 131 | - * @return integer ApiStashEdit::ERROR_* constant |
|
| 131 | + * @return string ApiStashEdit::ERROR_* constant |
|
| 132 | 132 | * @since 1.25 |
| 133 | 133 | */ |
| 134 | 134 | public static function parseAndStash( WikiPage $page, Content $content, User $user ) { |
@@ -73,6 +73,9 @@ |
||
| 73 | 73 | return (bool)$result; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $type |
|
| 78 | + */ |
|
| 76 | 79 | protected function processIndividual( $type, $params, $id ) { |
| 77 | 80 | $idResult = array( $type => $id ); |
| 78 | 81 | |
@@ -323,6 +323,10 @@ |
||
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | class AuthPluginUser { |
| 326 | + |
|
| 327 | + /** |
|
| 328 | + * @param User $user |
|
| 329 | + */ |
|
| 326 | 330 | function __construct( $user ) { |
| 327 | 331 | # Override this! |
| 328 | 332 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | /** |
| 186 | 186 | * Return the list of ipblocks fields that should be selected to create |
| 187 | 187 | * a new block. |
| 188 | - * @return array |
|
| 188 | + * @return string[] |
|
| 189 | 189 | */ |
| 190 | 190 | public static function selectFields() { |
| 191 | 191 | return array( |
@@ -1004,7 +1004,7 @@ discard block |
||
| 1004 | 1004 | /** |
| 1005 | 1005 | * Get a timestamp of the expiry for autoblocks |
| 1006 | 1006 | * |
| 1007 | - * @param string|int $timestamp |
|
| 1007 | + * @param string|false $timestamp |
|
| 1008 | 1008 | * @return string |
| 1009 | 1009 | */ |
| 1010 | 1010 | public static function getAutoblockExpiry( $timestamp ) { |
@@ -1357,7 +1357,7 @@ discard block |
||
| 1357 | 1357 | /** |
| 1358 | 1358 | * @since 1.19 |
| 1359 | 1359 | * |
| 1360 | - * @return mixed|string |
|
| 1360 | + * @return string |
|
| 1361 | 1361 | */ |
| 1362 | 1362 | public function getExpiry() { |
| 1363 | 1363 | return $this->mExpiry; |
@@ -1373,7 +1373,7 @@ discard block |
||
| 1373 | 1373 | |
| 1374 | 1374 | /** |
| 1375 | 1375 | * Get the user who implemented this block |
| 1376 | - * @return User|string Local User object or string for a foreign user |
|
| 1376 | + * @return User Local User object or string for a foreign user |
|
| 1377 | 1377 | */ |
| 1378 | 1378 | public function getBlocker() { |
| 1379 | 1379 | return $this->blocker; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * failures after this class is deserialized from cache with dead DB |
| 113 | 113 | * connection. |
| 114 | 114 | * |
| 115 | - * @return array |
|
| 115 | + * @return string[] |
|
| 116 | 116 | */ |
| 117 | 117 | function __sleep() { |
| 118 | 118 | return array( 'partitionCache', 'fullResultCache', 'title' ); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | /** |
| 487 | 487 | * Get a Title iterator for cascade-protected template/file use backlinks |
| 488 | 488 | * |
| 489 | - * @return TitleArray |
|
| 489 | + * @return TitleArrayFromResult|null |
|
| 490 | 490 | * @since 1.25 |
| 491 | 491 | */ |
| 492 | 492 | public function getCascadeProtectedLinks() { |
@@ -33,6 +33,7 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @since 1.20 |
| 35 | 35 | * @param bool $cacheEnabled |
| 36 | + * @return void |
|
| 36 | 37 | */ |
| 37 | 38 | function setCacheEnabled( $cacheEnabled ); |
| 38 | 39 | |
@@ -44,6 +45,7 @@ discard block |
||
| 44 | 45 | * |
| 45 | 46 | * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp. |
| 46 | 47 | * @param bool|null $cacheEnabled Sets if the cache should be enabled or not. |
| 48 | + * @return void |
|
| 47 | 49 | */ |
| 48 | 50 | function startCache( $cacheExpiry = null, $cacheEnabled = null ); |
| 49 | 51 | |
@@ -68,6 +70,7 @@ discard block |
||
| 68 | 70 | * Should be called after the last time anything is added via addCachedHTML. |
| 69 | 71 | * |
| 70 | 72 | * @since 1.20 |
| 73 | + * @return void |
|
| 71 | 74 | */ |
| 72 | 75 | function saveCache(); |
| 73 | 76 | |
@@ -78,6 +81,7 @@ discard block |
||
| 78 | 81 | * @since 1.20 |
| 79 | 82 | * |
| 80 | 83 | * @param int $cacheExpiry |
| 84 | + * @return void |
|
| 81 | 85 | */ |
| 82 | 86 | function setExpiry( $cacheExpiry ); |
| 83 | 87 | } |
@@ -259,7 +263,7 @@ discard block |
||
| 259 | 263 | * @param array|mixed $args |
| 260 | 264 | * @param string|null $key |
| 261 | 265 | * |
| 262 | - * @return mixed |
|
| 266 | + * @return string |
|
| 263 | 267 | */ |
| 264 | 268 | public function getCachedValue( $computeFunction, $args = array(), $key = null ) { |
| 265 | 269 | $this->initCaching(); |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | 100 | * Get the last-modified timestamp of the cache file |
| 101 | - * @return string|bool TS_MW timestamp |
|
| 101 | + * @return string|false TS_MW timestamp |
|
| 102 | 102 | */ |
| 103 | 103 | public function cacheTimestamp() { |
| 104 | 104 | $timestamp = filemtime( $this->cachePath() ); |