@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * @param RecentChange|RCCacheEntry $rc |
| 146 | 146 | * @param string|bool $watched Optionally timestamp for adding watched class |
| 147 | 147 | * |
| 148 | - * @return array of classes |
|
| 148 | + * @return string[] of classes |
|
| 149 | 149 | */ |
| 150 | 150 | protected function getHTMLClasses( $rc, $watched ) { |
| 151 | 151 | $classes = []; |
@@ -468,6 +468,8 @@ discard block |
||
| 468 | 468 | * |
| 469 | 469 | * @param string &$s HTML to update |
| 470 | 470 | * @param RecentChange &$rc |
| 471 | + * @param string $s |
|
| 472 | + * @param RecentChange $rc |
|
| 471 | 473 | */ |
| 472 | 474 | public function insertUserRelatedLinks( &$s, &$rc ) { |
| 473 | 475 | if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { |
@@ -636,6 +638,10 @@ discard block |
||
| 636 | 638 | return $s; |
| 637 | 639 | } |
| 638 | 640 | |
| 641 | + /** |
|
| 642 | + * @param string $s |
|
| 643 | + * @param RecentChange $rc |
|
| 644 | + */ |
|
| 639 | 645 | public function insertExtra( &$s, &$rc, &$classes ) { |
| 640 | 646 | // Empty, used for subclasses to add anything special. |
| 641 | 647 | } |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | |
| 772 | 772 | /** |
| 773 | 773 | * Get the base regex |
| 774 | - * @return array |
|
| 774 | + * @return string[] |
|
| 775 | 775 | */ |
| 776 | 776 | function getBaseRegex() { |
| 777 | 777 | if ( is_null( $this->baseRegex ) ) { |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | /** |
| 816 | 816 | * Get a regex for matching variables with parameters |
| 817 | 817 | * |
| 818 | - * @return string |
|
| 818 | + * @return string[] |
|
| 819 | 819 | */ |
| 820 | 820 | function getVariableRegex() { |
| 821 | 821 | return str_replace( "\\$1", "(.*?)", $this->getRegex() ); |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | * Returns array(magic word ID, parameter value) |
| 869 | 869 | * If there is no parameter value, that element will be false. |
| 870 | 870 | * |
| 871 | - * @param array $m |
|
| 871 | + * @param string[] $m |
|
| 872 | 872 | * |
| 873 | 873 | * @throws MWException |
| 874 | 874 | * @return array |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * Record a log event for a change being patrolled |
| 32 | 32 | * |
| 33 | - * @param int|RecentChange $rc Change identifier or RecentChange object |
|
| 33 | + * @param RecentChange $rc Change identifier or RecentChange object |
|
| 34 | 34 | * @param bool $auto Was this patrol event automatic? |
| 35 | 35 | * @param User $user User performing the action or null to use $wgUser |
| 36 | 36 | * @param string|string[] $tags Change tags to add to the patrol log entry |
@@ -296,7 +296,7 @@ |
||
| 296 | 296 | /** |
| 297 | 297 | * Get hooks from a directory of PHP files. |
| 298 | 298 | * @param string $dir Directory path to start at |
| 299 | - * @param int $recursive Pass self::FIND_RECURSIVE |
|
| 299 | + * @param int $recurse Pass self::FIND_RECURSIVE |
|
| 300 | 300 | * @return array Array: key => hook name; value => array of arguments or string 'unknown' |
| 301 | 301 | */ |
| 302 | 302 | private function getHooksFromDir( $dir, $recurse = 0 ) { |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | /** |
| 230 | 230 | * @param ResultWrapper|resource $res |
| 231 | - * @return stdClass|bool |
|
| 231 | + * @return stdClass |
|
| 232 | 232 | * @throws DBUnexpectedError |
| 233 | 233 | */ |
| 234 | 234 | function fetchObject( $res ) { |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | /** |
| 364 | 364 | * Get the name of the specified field in a result |
| 365 | 365 | * |
| 366 | - * @param ResultWrapper|resource $res |
|
| 366 | + * @param resource $res |
|
| 367 | 367 | * @param int $n |
| 368 | 368 | * @return string |
| 369 | 369 | */ |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | /** |
| 387 | 387 | * Get the type of the specified field in a result |
| 388 | 388 | * |
| 389 | - * @param ResultWrapper|resource $res |
|
| 389 | + * @param resource $res |
|
| 390 | 390 | * @param int $n |
| 391 | 391 | * @return string |
| 392 | 392 | */ |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | /** |
| 409 | 409 | * Move internal result pointer |
| 410 | 410 | * |
| 411 | - * @param ResultWrapper|resource $res |
|
| 411 | + * @param resource $res |
|
| 412 | 412 | * @param int $row |
| 413 | 413 | * @return bool |
| 414 | 414 | */ |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | /** |
| 803 | 803 | * Get the position of the master from SHOW SLAVE STATUS |
| 804 | 804 | * |
| 805 | - * @return MySQLMasterPos|bool |
|
| 805 | + * @return DBMasterPos |
|
| 806 | 806 | */ |
| 807 | 807 | function getSlavePos() { |
| 808 | 808 | $res = $this->query( 'SHOW SLAVE STATUS', 'DatabaseBase::getSlavePos' ); |
@@ -966,6 +966,9 @@ discard block |
||
| 966 | 966 | return false; |
| 967 | 967 | } |
| 968 | 968 | |
| 969 | + /** |
|
| 970 | + * @param string $lockName |
|
| 971 | + */ |
|
| 969 | 972 | private function makeLockName( $lockName ) { |
| 970 | 973 | // http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock |
| 971 | 974 | // Newer version enforce a 64 char length limit. |
@@ -1321,6 +1324,9 @@ discard block |
||
| 1321 | 1324 | $is_pk, $is_unique, $is_multiple, $is_key, $type, $binary, |
| 1322 | 1325 | $is_numeric, $is_blob, $is_unsigned, $is_zerofill; |
| 1323 | 1326 | |
| 1327 | + /** |
|
| 1328 | + * @param stdClass $info |
|
| 1329 | + */ |
|
| 1324 | 1330 | function __construct( $info ) { |
| 1325 | 1331 | $this->name = $info->name; |
| 1326 | 1332 | $this->tablename = $info->table; |
@@ -1467,7 +1473,7 @@ discard block |
||
| 1467 | 1473 | } |
| 1468 | 1474 | |
| 1469 | 1475 | /** |
| 1470 | - * @return string|bool |
|
| 1476 | + * @return string|false |
|
| 1471 | 1477 | */ |
| 1472 | 1478 | protected function getBinlogName() { |
| 1473 | 1479 | $m = []; |
@@ -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 boolean 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 boolean 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 [ |
@@ -410,6 +410,11 @@ |
||
| 410 | 410 | return true; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | + /** |
|
| 414 | + * @param WatchedItem|null $item |
|
| 415 | + * @param string $force |
|
| 416 | + * @param integer $oldid |
|
| 417 | + */ |
|
| 413 | 418 | private function getNotificationTimestamp( User $user, Title $title, $item, $force, $oldid ) { |
| 414 | 419 | if ( !$oldid ) { |
| 415 | 420 | // No oldid given, assuming latest revision; clear the timestamp. |
@@ -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 [ |
@@ -1108,11 +1108,11 @@ discard block |
||
| 1108 | 1108 | |
| 1109 | 1109 | /** |
| 1110 | 1110 | * Upload a file and record it in the DB |
| 1111 | - * @param string|FSFile $src Source storage path, virtual URL, or filesystem path |
|
| 1111 | + * @param string $src Source storage path, virtual URL, or filesystem path |
|
| 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 |
@@ -1799,7 +1799,7 @@ discard block |
||
| 1799 | 1799 | * it skips the parser cache. |
| 1800 | 1800 | * |
| 1801 | 1801 | * @param Language $lang What language to get description in (Optional) |
| 1802 | - * @return bool|mixed |
|
| 1802 | + * @return false|string |
|
| 1803 | 1803 | */ |
| 1804 | 1804 | function getDescriptionText( $lang = null ) { |
| 1805 | 1805 | $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL ); |
@@ -1834,7 +1834,7 @@ discard block |
||
| 1834 | 1834 | } |
| 1835 | 1835 | |
| 1836 | 1836 | /** |
| 1837 | - * @return bool|string |
|
| 1837 | + * @return string |
|
| 1838 | 1838 | */ |
| 1839 | 1839 | function getTimestamp() { |
| 1840 | 1840 | $this->load(); |
@@ -1843,7 +1843,7 @@ discard block |
||
| 1843 | 1843 | } |
| 1844 | 1844 | |
| 1845 | 1845 | /** |
| 1846 | - * @return bool|string |
|
| 1846 | + * @return string|false |
|
| 1847 | 1847 | */ |
| 1848 | 1848 | public function getDescriptionTouched() { |
| 1849 | 1849 | // The DB lookup might return false, e.g. if the file was just deleted, or the shared DB 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|FSFile $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 |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | * Options to $options include: |
| 1159 | 1159 | * - headers : name/value map of HTTP headers to use in response to GET/HEAD requests |
| 1160 | 1160 | * |
| 1161 | - * @param string|FSFile $src The source file system path, storage path, or URL |
|
| 1161 | + * @param string $src The source file system path, storage path, or URL |
|
| 1162 | 1162 | * @param string $dstRel The destination relative path |
| 1163 | 1163 | * @param string $archiveRel The relative path where the existing file is to |
| 1164 | 1164 | * be archived, if there is one. Relative to the public zone root. |