@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @param array $newname |
|
76 | + * @param string $newname |
|
77 | 77 | * @return string |
78 | 78 | * @throws MWException |
79 | 79 | */ |
@@ -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 ) { |
@@ -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 [ |
@@ -289,7 +289,7 @@ |
||
289 | 289 | * @param string $table Table name |
290 | 290 | * @param string $field Field name to check |
291 | 291 | * @param string $patchFile Path to the patch to correct the field |
292 | - * @return bool |
|
292 | + * @return boolean|null |
|
293 | 293 | */ |
294 | 294 | protected function checkBin( $table, $field, $patchFile ) { |
295 | 295 | if ( !$this->doTable( $table ) ) { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * @return array |
|
88 | + * @return string[] |
|
89 | 89 | */ |
90 | 90 | function getOrderFields() { |
91 | 91 | return array( 'rd_namespace', 'rd_title', 'rd_from' ); |
@@ -423,7 +423,7 @@ |
||
423 | 423 | * Returns a sentence describing the log action. Usually |
424 | 424 | * a Message object is returned, but old style log types |
425 | 425 | * and entries might return pre-escaped HTML string. |
426 | - * @return Message|string Pre-escaped HTML |
|
426 | + * @return string Pre-escaped HTML |
|
427 | 427 | */ |
428 | 428 | protected function getActionMessage() { |
429 | 429 | $message = $this->msg( $this->getMessageKey() ); |