@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * Most subclasses will want to call assertRepoDefined() here. |
| 161 | 161 | * |
| 162 | 162 | * @param Title|string|bool $title |
| 163 | - * @param FileRepo|bool $repo |
|
| 163 | + * @param FileRepo $repo |
|
| 164 | 164 | */ |
| 165 | 165 | function __construct( $title, $repo ) { |
| 166 | 166 | // Some subclasses do not use $title, but set name/title some other way |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | * Most callers don't check the return value, but ForeignAPIFile::getPath |
| 412 | 412 | * returns false. |
| 413 | 413 | * |
| 414 | - * @return string|bool ForeignAPIFile::getPath can return false |
|
| 414 | + * @return string ForeignAPIFile::getPath can return false |
|
| 415 | 415 | */ |
| 416 | 416 | public function getPath() { |
| 417 | 417 | if ( !isset( $this->path ) ) { |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | * Overridden by LocalFile, UnregisteredLocalFile |
| 458 | 458 | * |
| 459 | 459 | * @param int $page |
| 460 | - * @return int|bool |
|
| 460 | + * @return boolean |
|
| 461 | 461 | */ |
| 462 | 462 | public function getWidth( $page = 1 ) { |
| 463 | 463 | return false; |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | * Overridden by LocalFile, UnregisteredLocalFile |
| 472 | 472 | * |
| 473 | 473 | * @param int $page |
| 474 | - * @return bool|int False on failure |
|
| 474 | + * @return boolean False on failure |
|
| 475 | 475 | */ |
| 476 | 476 | public function getHeight( $page = 1 ) { |
| 477 | 477 | return false; |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | * |
| 485 | 485 | * @param int $desiredWidth |
| 486 | 486 | * @param int $page |
| 487 | - * @return bool|int |
|
| 487 | + * @return integer |
|
| 488 | 488 | */ |
| 489 | 489 | public function getThumbnailBucket( $desiredWidth, $page = 1 ) { |
| 490 | 490 | global $wgThumbnailBuckets, $wgThumbnailMinimumBucketDistance; |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | * Get handler-specific metadata |
| 634 | 634 | * Overridden by LocalFile, UnregisteredLocalFile |
| 635 | 635 | * STUB |
| 636 | - * @return bool|array |
|
| 636 | + * @return boolean |
|
| 637 | 637 | */ |
| 638 | 638 | public function getMetadata() { |
| 639 | 639 | return false; |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | /** |
| 643 | 643 | * Like getMetadata but returns a handler independent array of common values. |
| 644 | 644 | * @see MediaHandler::getCommonMetaArray() |
| 645 | - * @return array|bool Array or false if not supported |
|
| 645 | + * @return boolean Array or false if not supported |
|
| 646 | 646 | * @since 1.23 |
| 647 | 647 | */ |
| 648 | 648 | public function getCommonMetaArray() { |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | * |
| 661 | 661 | * @param array|string $metadata Array or string of (serialized) metadata |
| 662 | 662 | * @param int $version Version number. |
| 663 | - * @return array Array containing metadata, or what was passed to it on fail |
|
| 663 | + * @return ApiResult Array containing metadata, or what was passed to it on fail |
|
| 664 | 664 | * (unserializing if not array) |
| 665 | 665 | */ |
| 666 | 666 | public function convertMetadataVersion( $metadata, $version ) { |
@@ -1359,7 +1359,7 @@ discard block |
||
| 1359 | 1359 | /** |
| 1360 | 1360 | * Get a MediaHandler instance for this file |
| 1361 | 1361 | * |
| 1362 | - * @return MediaHandler|bool Registered MediaHandler for file's MIME type |
|
| 1362 | + * @return MediaHandler Registered MediaHandler for file's MIME type |
|
| 1363 | 1363 | * or false if none found |
| 1364 | 1364 | */ |
| 1365 | 1365 | function getHandler() { |
@@ -1782,7 +1782,7 @@ discard block |
||
| 1782 | 1782 | * @param bool $watch |
| 1783 | 1783 | * @param string|bool $timestamp |
| 1784 | 1784 | * @param null|User $user User object or null to use $wgUser |
| 1785 | - * @return bool |
|
| 1785 | + * @return boolean|null |
|
| 1786 | 1786 | * @throws MWException |
| 1787 | 1787 | */ |
| 1788 | 1788 | function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', |
@@ -1817,7 +1817,7 @@ discard block |
||
| 1817 | 1817 | } |
| 1818 | 1818 | |
| 1819 | 1819 | /** |
| 1820 | - * @param bool|IContextSource $context Context to use (optional) |
|
| 1820 | + * @param IContextSource $context Context to use (optional) |
|
| 1821 | 1821 | * @return bool |
| 1822 | 1822 | */ |
| 1823 | 1823 | function formatMetadata( $context = false ) { |
@@ -1964,7 +1964,7 @@ discard block |
||
| 1964 | 1964 | * Returns the number of pages of a multipage document, or false for |
| 1965 | 1965 | * documents which aren't multipage documents |
| 1966 | 1966 | * |
| 1967 | - * @return bool|int |
|
| 1967 | + * @return string|boolean |
|
| 1968 | 1968 | */ |
| 1969 | 1969 | function pageCount() { |
| 1970 | 1970 | if ( !isset( $this->pageCount ) ) { |
@@ -2108,7 +2108,7 @@ discard block |
||
| 2108 | 2108 | * Returns false if the file does not have a description page, or retrieving the timestamp |
| 2109 | 2109 | * would be expensive. |
| 2110 | 2110 | * @since 1.25 |
| 2111 | - * @return string|bool |
|
| 2111 | + * @return boolean |
|
| 2112 | 2112 | */ |
| 2113 | 2113 | public function getDescriptionTouched() { |
| 2114 | 2114 | return false; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | protected $repoClass = 'ForeignApiRepo'; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @param Title|string|bool $title |
|
| 36 | + * @param Title|null $title |
|
| 37 | 37 | * @param ForeignApiRepo $repo |
| 38 | 38 | * @param array $info |
| 39 | 39 | * @param bool $exists |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * @param int $page |
| 154 | - * @return int|number |
|
| 154 | + * @return integer |
|
| 155 | 155 | */ |
| 156 | 156 | public function getWidth( $page = 1 ) { |
| 157 | 157 | return isset( $this->mInfo['width'] ) ? intval( $this->mInfo['width'] ) : 0; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
| 169 | - * @return bool|null|string |
|
| 169 | + * @return string|null |
|
| 170 | 170 | */ |
| 171 | 171 | public function getMetadata() { |
| 172 | 172 | if ( isset( $this->mInfo['metadata'] ) ) { |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | - * @return bool|int|null |
|
| 208 | + * @return integer|null |
|
| 209 | 209 | */ |
| 210 | 210 | public function getSize() { |
| 211 | 211 | return isset( $this->mInfo['size'] ) ? intval( $this->mInfo['size'] ) : null; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | - * @return bool|string |
|
| 271 | + * @return string|false |
|
| 272 | 272 | */ |
| 273 | 273 | function getTimestamp() { |
| 274 | 274 | return wfTimestamp( TS_MW, |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Fields in the oldimage table |
| 106 | - * @return array |
|
| 106 | + * @return string[] |
|
| 107 | 107 | */ |
| 108 | 108 | static function selectFields() { |
| 109 | 109 | return array( |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | 234 | * @param string $prefix |
| 235 | - * @return array |
|
| 235 | + * @return string[] |
|
| 236 | 236 | */ |
| 237 | 237 | function getCacheFields( $prefix = 'img_' ) { |
| 238 | 238 | $fields = parent::getCacheFields( $prefix ); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * @return bool |
|
| 181 | + * @return boolean|string |
|
| 182 | 182 | */ |
| 183 | 183 | function getMetadata() { |
| 184 | 184 | if ( !isset( $this->metadata ) ) { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | - * @return bool|string |
|
| 196 | + * @return string|false |
|
| 197 | 197 | */ |
| 198 | 198 | function getURL() { |
| 199 | 199 | if ( $this->repo ) { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /** |
| 214 | - * @param array $data |
|
| 214 | + * @param string $data |
|
| 215 | 215 | * @return bool|array |
| 216 | 216 | */ |
| 217 | 217 | function getImageInfo( $data ) { |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | * @param string $target Used in cache key creation, mostly |
| 547 | 547 | * @param array $query The query parameters for the API request |
| 548 | 548 | * @param int $cacheTTL Time to live for the memcached caching |
| 549 | - * @return null |
|
| 549 | + * @return string |
|
| 550 | 550 | */ |
| 551 | 551 | public function httpGetCached( $target, $query, $cacheTTL = 3600 ) { |
| 552 | 552 | if ( $this->mApiBase ) { |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * Get a key on the primary cache for this repository. |
| 85 | 85 | * Returns false if the repository's cache is not accessible at this site. |
| 86 | 86 | * The parameters are the parts of the key, as for wfMemcKey(). |
| 87 | - * @return bool|string |
|
| 87 | + * @return string|false |
|
| 88 | 88 | */ |
| 89 | 89 | function getSharedCacheKey( /*...*/ ) { |
| 90 | 90 | if ( $this->hasSharedCache() ) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * Search repositories for an image. |
| 106 | 106 | * You can also use wfFindFile() to do this. |
| 107 | 107 | * |
| 108 | - * @param Title|string $title Title object or string |
|
| 108 | + * @param string $title Title object or string |
|
| 109 | 109 | * @param array $options Associative array of options: |
| 110 | 110 | * time: requested time for an archived image, or false for the |
| 111 | 111 | * current version. An image object will be returned which was |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | /** |
| 316 | 316 | * Get the repo instance with a given key. |
| 317 | 317 | * @param string|int $index |
| 318 | - * @return bool|LocalRepo |
|
| 318 | + * @return string |
|
| 319 | 319 | */ |
| 320 | 320 | function getRepo( $index ) { |
| 321 | 321 | if ( !$this->reposInitialised ) { |
@@ -52,6 +52,9 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | const RESTART_ON_ERROR = 1; |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param integer $numProcs |
|
| 57 | + */ |
|
| 55 | 58 | public function __construct( $numProcs, $flags = 0 ) { |
| 56 | 59 | if ( PHP_SAPI != 'cli' ) { |
| 57 | 60 | throw new MWException( "ForkController cannot be used from the web." ); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | /** |
| 251 | 251 | * Get an URL to a web viewer link to the HEAD revision. |
| 252 | 252 | * |
| 253 | - * @return string|bool String if a URL is available or false otherwise |
|
| 253 | + * @return false|string String if a URL is available or false otherwise |
|
| 254 | 254 | */ |
| 255 | 255 | public function getHeadViewUrl() { |
| 256 | 256 | $url = $this->getRemoteUrl(); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | /** |
| 383 | 383 | * @see self::getHeadViewUrl() |
| 384 | - * @return bool|string |
|
| 384 | + * @return false|string |
|
| 385 | 385 | */ |
| 386 | 386 | public static function headViewUrl() { |
| 387 | 387 | return self::repo()->getHeadViewUrl(); |