@@ -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 string|false TS_MW timestamp or false on failure |
|
76 | 76 | */ |
77 | 77 | public function getTimestamp() { |
78 | 78 | MediaWiki\suppressWarnings(); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * fairly neatly. |
219 | 219 | * |
220 | 220 | * @param bool $recache |
221 | - * @return bool|string False on failure |
|
221 | + * @return string|false False on failure |
|
222 | 222 | */ |
223 | 223 | public function getSha1Base36( $recache = false ) { |
224 | 224 | if ( $this->sha1Base36 !== null && !$recache ) { |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | * fairly neatly. |
271 | 271 | * |
272 | 272 | * @param string $path |
273 | - * @return bool|string False on failure |
|
273 | + * @return string|false False on failure |
|
274 | 274 | */ |
275 | 275 | public static function getSha1Base36FromPath( $path ) { |
276 | 276 | $fsFile = new self( $path ); |
@@ -470,6 +470,10 @@ |
||
470 | 470 | return $status; |
471 | 471 | } |
472 | 472 | |
473 | + /** |
|
474 | + * @param string $fullCont |
|
475 | + * @param string $dirRel |
|
476 | + */ |
|
473 | 477 | protected function doSecureInternal( $fullCont, $dirRel, array $params ) { |
474 | 478 | $status = Status::newGood(); |
475 | 479 | list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | * (lists are truncated to 10000 item with no way to page), and is just a performance risk. |
1315 | 1315 | * |
1316 | 1316 | * @param string $container Resolved Swift container |
1317 | - * @param array $readGrps List of the possible criteria for a request to have |
|
1317 | + * @param string[] $readGrps List of the possible criteria for a request to have |
|
1318 | 1318 | * access to read a container. Each item is one of the following formats: |
1319 | 1319 | * - account:user : Grants access if the request is by the given user |
1320 | 1320 | * - ".r:<regex>" : Grants access if the request is from a referrer host that |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | * Setting this to '*' effectively makes a container public. |
1323 | 1323 | * -".rlistings:<regex>" : Grants access if the request is from a referrer host that |
1324 | 1324 | * matches the expression and the request is for a listing. |
1325 | - * @param array $writeGrps A list of the possible criteria for a request to have |
|
1325 | + * @param string[] $writeGrps A list of the possible criteria for a request to have |
|
1326 | 1326 | * access to write to a container. Each item is of the following format: |
1327 | 1327 | * - account:user : Grants access if the request is by the given user |
1328 | 1328 | * @return Status |
@@ -1705,7 +1705,7 @@ discard block |
||
1705 | 1705 | * @param array $creds From getAuthentication() |
1706 | 1706 | * @param string $container |
1707 | 1707 | * @param string $object |
1708 | - * @return array |
|
1708 | + * @return string |
|
1709 | 1709 | */ |
1710 | 1710 | protected function storageUrl( array $creds, $container = null, $object = null ) { |
1711 | 1711 | $parts = [ $creds['storage_url'] ]; |
@@ -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 |
@@ -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; |
@@ -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 ApiResult 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 ) { |
@@ -1781,7 +1781,7 @@ discard block |
||
1781 | 1781 | * @param bool $watch |
1782 | 1782 | * @param string|bool $timestamp |
1783 | 1783 | * @param null|User $user User object or null to use $wgUser |
1784 | - * @return bool |
|
1784 | + * @return boolean|null |
|
1785 | 1785 | * @throws MWException |
1786 | 1786 | */ |
1787 | 1787 | function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', |
@@ -1816,7 +1816,7 @@ discard block |
||
1816 | 1816 | } |
1817 | 1817 | |
1818 | 1818 | /** |
1819 | - * @param bool|IContextSource $context Context to use (optional) |
|
1819 | + * @param IContextSource $context Context to use (optional) |
|
1820 | 1820 | * @return bool |
1821 | 1821 | */ |
1822 | 1822 | function formatMetadata( $context = false ) { |
@@ -1963,7 +1963,7 @@ discard block |
||
1963 | 1963 | * Returns the number of pages of a multipage document, or false for |
1964 | 1964 | * documents which aren't multipage documents |
1965 | 1965 | * |
1966 | - * @return bool|int |
|
1966 | + * @return string|boolean |
|
1967 | 1967 | */ |
1968 | 1968 | function pageCount() { |
1969 | 1969 | if ( !isset( $this->pageCount ) ) { |
@@ -2030,7 +2030,7 @@ discard block |
||
2030 | 2030 | /** |
2031 | 2031 | * Get the HTML text of the description page, if available |
2032 | 2032 | * |
2033 | - * @param bool|Language $lang Optional language to fetch description in |
|
2033 | + * @param Language $lang Optional language to fetch description in |
|
2034 | 2034 | * @return string |
2035 | 2035 | */ |
2036 | 2036 | function getDescriptionText( $lang = 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 |
@@ -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, |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | /** |
193 | 193 | * Fields in the image table |
194 | - * @return array |
|
194 | + * @return string[] |
|
195 | 195 | */ |
196 | 196 | static function selectFields() { |
197 | 197 | return [ |
@@ -1114,11 +1114,11 @@ discard block |
||
1114 | 1114 | |
1115 | 1115 | /** |
1116 | 1116 | * Upload a file and record it in the DB |
1117 | - * @param string|FSFile $src Source storage path, virtual URL, or filesystem path |
|
1117 | + * @param string $src Source storage path, virtual URL, or filesystem path |
|
1118 | 1118 | * @param string $comment Upload description |
1119 | 1119 | * @param string $pageText Text to use for the new description page, |
1120 | 1120 | * if a new description page is created |
1121 | - * @param int|bool $flags Flags for publish() |
|
1121 | + * @param integer $flags Flags for publish() |
|
1122 | 1122 | * @param array|bool $props File properties, if known. This can be used to |
1123 | 1123 | * reduce the upload time when uploading virtual URLs for which the file |
1124 | 1124 | * info is already known |
@@ -1815,7 +1815,7 @@ discard block |
||
1815 | 1815 | * it skips the parser cache. |
1816 | 1816 | * |
1817 | 1817 | * @param Language $lang What language to get description in (Optional) |
1818 | - * @return bool|mixed |
|
1818 | + * @return false|string |
|
1819 | 1819 | */ |
1820 | 1820 | function getDescriptionText( $lang = null ) { |
1821 | 1821 | $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL ); |
@@ -1859,7 +1859,7 @@ discard block |
||
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | /** |
1862 | - * @return bool|string |
|
1862 | + * @return string|false |
|
1863 | 1863 | */ |
1864 | 1864 | public function getDescriptionTouched() { |
1865 | 1865 | // The DB lookup might return false, e.g. if the file was just deleted, or the shared DB repo |
@@ -116,6 +116,9 @@ |
||
116 | 116 | wfDebug( "IMPORT: $data\n" ); |
117 | 117 | } |
118 | 118 | |
119 | + /** |
|
120 | + * @param string $msg |
|
121 | + */ |
|
119 | 122 | public function notice( $msg /*, $param, ...*/ ) { |
120 | 123 | $params = func_get_args(); |
121 | 124 | array_shift( $params ); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | |
123 | 123 | /** |
124 | 124 | * @param string $name |
125 | - * @return string |
|
125 | + * @return string[] |
|
126 | 126 | */ |
127 | 127 | private function decodeQueueName( $name ) { |
128 | 128 | list( $type, $wiki ) = explode( '/', $name, 2 ); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * @param string $uuid 32 char hex string |
315 | 315 | * @param int $rand Random unsigned integer (31 bits) |
316 | 316 | * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random) |
317 | - * @return stdClass|bool Row|false |
|
317 | + * @return Title Row|false |
|
318 | 318 | */ |
319 | 319 | protected function claimRandom( $uuid, $rand, $gte ) { |
320 | 320 | $dbw = $this->getMasterDB(); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | * Reserve a row with a single UPDATE without holding row locks over RTTs... |
392 | 392 | * |
393 | 393 | * @param string $uuid 32 char hex string |
394 | - * @return stdClass|bool Row|false |
|
394 | + * @return Title Row|false |
|
395 | 395 | */ |
396 | 396 | protected function claimOldest( $uuid ) { |
397 | 397 | $dbw = $this->getMasterDB(); |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | |
546 | 546 | /** |
547 | 547 | * @see JobQueue::getAllQueuedJobs() |
548 | - * @return Iterator |
|
548 | + * @return MappedIterator|null |
|
549 | 549 | */ |
550 | 550 | public function getAllQueuedJobs() { |
551 | 551 | return $this->getJobIterator( [ 'job_cmd' => $this->getType(), 'job_token' => '' ] ); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | |
554 | 554 | /** |
555 | 555 | * @see JobQueue::getAllAcquiredJobs() |
556 | - * @return Iterator |
|
556 | + * @return MappedIterator|null |
|
557 | 557 | */ |
558 | 558 | public function getAllAcquiredJobs() { |
559 | 559 | return $this->getJobIterator( [ 'job_cmd' => $this->getType(), "job_token > ''" ] ); |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | |
562 | 562 | /** |
563 | 563 | * @param array $conds Query conditions |
564 | - * @return Iterator |
|
564 | + * @return MappedIterator|null |
|
565 | 565 | */ |
566 | 566 | protected function getJobIterator( array $conds ) { |
567 | 567 | $dbr = $this->getSlaveDB(); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | /** |
814 | 814 | * Return the list of job fields that should be selected. |
815 | 815 | * @since 1.23 |
816 | - * @return array |
|
816 | + * @return string[] |
|
817 | 817 | */ |
818 | 818 | public static function selectFields() { |
819 | 819 | return [ |