@@ -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, |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | /** |
| 189 | 189 | * Fields in the image table |
| 190 | - * @return array |
|
| 190 | + * @return string[] |
|
| 191 | 191 | */ |
| 192 | 192 | static function selectFields() { |
| 193 | 193 | return array( |
@@ -1112,7 +1112,7 @@ discard block |
||
| 1112 | 1112 | * @param string $comment Upload description |
| 1113 | 1113 | * @param string $pageText Text to use for the new description page, |
| 1114 | 1114 | * if a new description page is created |
| 1115 | - * @param int|bool $flags Flags for publish() |
|
| 1115 | + * @param integer $flags Flags for publish() |
|
| 1116 | 1116 | * @param array|bool $props File properties, if known. This can be used to |
| 1117 | 1117 | * reduce the upload time when uploading virtual URLs for which the file |
| 1118 | 1118 | * info is already known |
@@ -1786,7 +1786,7 @@ discard block |
||
| 1786 | 1786 | * it skips the parser cache. |
| 1787 | 1787 | * |
| 1788 | 1788 | * @param Language $lang What language to get description in (Optional) |
| 1789 | - * @return bool|mixed |
|
| 1789 | + * @return false|string |
|
| 1790 | 1790 | */ |
| 1791 | 1791 | function getDescriptionText( $lang = null ) { |
| 1792 | 1792 | $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL ); |
@@ -1821,7 +1821,7 @@ discard block |
||
| 1821 | 1821 | } |
| 1822 | 1822 | |
| 1823 | 1823 | /** |
| 1824 | - * @return bool|string |
|
| 1824 | + * @return string |
|
| 1825 | 1825 | */ |
| 1826 | 1826 | function getTimestamp() { |
| 1827 | 1827 | $this->load(); |
@@ -1830,7 +1830,7 @@ discard block |
||
| 1830 | 1830 | } |
| 1831 | 1831 | |
| 1832 | 1832 | /** |
| 1833 | - * @return bool|string |
|
| 1833 | + * @return string|false |
|
| 1834 | 1834 | */ |
| 1835 | 1835 | public function getDescriptionTouched() { |
| 1836 | 1836 | // The DB lookup might return false, e.g. if the file was just deleted, or the shared DB repo |
@@ -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 ) { |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * Get an explanatory message if this repo is read-only. |
| 221 | 221 | * This checks if an administrator disabled writes to the backend. |
| 222 | 222 | * |
| 223 | - * @return string|bool Returns false if the repo is not read-only |
|
| 223 | + * @return string|false Returns false if the repo is not read-only |
|
| 224 | 224 | */ |
| 225 | 225 | public function getReadOnlyReason() { |
| 226 | 226 | return $this->backend->getReadOnlyReason(); |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | * |
| 717 | 717 | * @param string $query Query string to append |
| 718 | 718 | * @param string $entry Entry point; defaults to index |
| 719 | - * @return string|bool False on failure |
|
| 719 | + * @return string|false False on failure |
|
| 720 | 720 | */ |
| 721 | 721 | public function makeUrl( $query = '', $entry = 'index' ) { |
| 722 | 722 | if ( isset( $this->scriptDirUrl ) ) { |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | /** |
| 798 | 798 | * Get the URL of the stylesheet to apply to description pages |
| 799 | 799 | * |
| 800 | - * @return string|bool False on failure |
|
| 800 | + * @return string|false False on failure |
|
| 801 | 801 | */ |
| 802 | 802 | public function getDescriptionStylesheetUrl() { |
| 803 | 803 | if ( isset( $this->scriptDirUrl ) ) { |
@@ -958,7 +958,7 @@ discard block |
||
| 958 | 958 | * |
| 959 | 959 | * @param string $src Source file system path, storage path, or virtual URL |
| 960 | 960 | * @param string $dst Virtual URL or storage path |
| 961 | - * @param array|string|null $options An array consisting of a key named headers |
|
| 961 | + * @param string $options An array consisting of a key named headers |
|
| 962 | 962 | * listing extra headers. If a string, taken as content-disposition header. |
| 963 | 963 | * (Support for array of options new in 1.23) |
| 964 | 964 | * @return FileRepoStatus |
@@ -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." ); |