@@ -205,42 +205,42 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | - * @return mixed DB key name, or false on failure |
|
| 208 | + * @return boolean DB key name, or false on failure |
|
| 209 | 209 | */ |
| 210 | 210 | public function getName() { |
| 211 | 211 | return $this->getX( 'mName' ); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * @return mixed Category ID, or false on failure |
|
| 215 | + * @return boolean Category ID, or false on failure |
|
| 216 | 216 | */ |
| 217 | 217 | public function getID() { |
| 218 | 218 | return $this->getX( 'mID' ); |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | - * @return mixed Total number of member pages, or false on failure |
|
| 222 | + * @return boolean Total number of member pages, or false on failure |
|
| 223 | 223 | */ |
| 224 | 224 | public function getPageCount() { |
| 225 | 225 | return $this->getX( 'mPages' ); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
| 229 | - * @return mixed Number of subcategories, or false on failure |
|
| 229 | + * @return boolean Number of subcategories, or false on failure |
|
| 230 | 230 | */ |
| 231 | 231 | public function getSubcatCount() { |
| 232 | 232 | return $this->getX( 'mSubcats' ); |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | - * @return mixed Number of member files, or false on failure |
|
| 236 | + * @return boolean Number of member files, or false on failure |
|
| 237 | 237 | */ |
| 238 | 238 | public function getFileCount() { |
| 239 | 239 | return $this->getX( 'mFiles' ); |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | - * @return Title|bool Title for this category, or false on failure. |
|
| 243 | + * @return Title Title for this category, or false on failure. |
|
| 244 | 244 | */ |
| 245 | 245 | public function getTitle() { |
| 246 | 246 | if ( $this->mTitle ) { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | * category sort key $offset. |
| 261 | 261 | * @param int $limit |
| 262 | 262 | * @param string $offset |
| 263 | - * @return TitleArray TitleArray object for category members. |
|
| 263 | + * @return TitleArrayFromResult|null TitleArray object for category members. |
|
| 264 | 264 | */ |
| 265 | 265 | public function getMembers( $limit = false, $offset = '' ) { |
| 266 | 266 | |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | * |
| 660 | 660 | * @param IContextSource $context Context to use, anything else will be ignored. |
| 661 | 661 | * @param int $old Revision ID we want to show and diff with. |
| 662 | - * @param int|string $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
| 662 | + * @param integer $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
| 663 | 663 | * @param int $rcid FIXME: Deprecated, no longer used. Defaults to 0. |
| 664 | 664 | * @param bool $refreshCache If set, refreshes the diff cache. Defaults to false. |
| 665 | 665 | * @param bool $unhide If set, allow viewing deleted revs. Defaults to false. |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | * @param Title $title The page's title |
| 890 | 890 | * @param bool &$hasHistory Whether the page has a history |
| 891 | 891 | * |
| 892 | - * @return mixed String containing deletion reason or empty string, or |
|
| 892 | + * @return false|string String containing deletion reason or empty string, or |
|
| 893 | 893 | * boolean false if no revision occurred |
| 894 | 894 | * |
| 895 | 895 | * @todo &$hasHistory is extremely ugly, it's here because |
@@ -373,8 +373,8 @@ discard block |
||
| 373 | 373 | /** |
| 374 | 374 | * SELECT wrapper |
| 375 | 375 | * |
| 376 | - * @param mixed $table Array or string, table name(s) (prefix auto-added) |
|
| 377 | - * @param mixed $vars Array or string, field name(s) to be retrieved |
|
| 376 | + * @param string $table Array or string, table name(s) (prefix auto-added) |
|
| 377 | + * @param string $vars Array or string, field name(s) to be retrieved |
|
| 378 | 378 | * @param mixed $conds Array or string, condition(s) for WHERE |
| 379 | 379 | * @param string $fname Calling function name (use __METHOD__) for logs/profiling |
| 380 | 380 | * @param array $options Associative array of options (e.g. |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | * code for list of supported stuff |
| 383 | 383 | * @param array $join_conds Associative array of table join conditions |
| 384 | 384 | * (optional) (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
| 385 | - * @return mixed Database result resource (feed to Database::fetchObject |
|
| 385 | + * @return MssqlResultWrapper Database result resource (feed to Database::fetchObject |
|
| 386 | 386 | * or whatever), or false on failure |
| 387 | 387 | * @throws DBQueryError |
| 388 | 388 | * @throws DBUnexpectedError |
@@ -871,7 +871,7 @@ discard block |
||
| 871 | 871 | * |
| 872 | 872 | * @param string $sql SQL query we will append the limit too |
| 873 | 873 | * @param int $limit The SQL limit |
| 874 | - * @param bool|int $offset The SQL offset (default false) |
|
| 874 | + * @param string|false $offset The SQL offset (default false) |
|
| 875 | 875 | * @return array|string |
| 876 | 876 | * @throws DBUnexpectedError |
| 877 | 877 | */ |
@@ -1189,7 +1189,7 @@ discard block |
||
| 1189 | 1189 | /** |
| 1190 | 1190 | * @param array $options An associative array of options to be turned into |
| 1191 | 1191 | * an SQL query, valid keys are listed in the function. |
| 1192 | - * @return array |
|
| 1192 | + * @return string[] |
|
| 1193 | 1193 | */ |
| 1194 | 1194 | public function makeSelectOptions( $options ) { |
| 1195 | 1195 | $tailOpts = ''; |
@@ -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 [ |