@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | parent::__construct( 'Newpages' ); |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param string $par |
|
44 | + */ |
|
42 | 45 | protected function setup( $par ) { |
43 | 46 | // Options |
44 | 47 | $opts = new FormOptions(); |
@@ -439,6 +442,9 @@ discard block |
||
439 | 442 | return "$sitename - $desc [$code]"; |
440 | 443 | } |
441 | 444 | |
445 | + /** |
|
446 | + * @param null|stdClass $row |
|
447 | + */ |
|
442 | 448 | protected function feedItem( $row ) { |
443 | 449 | $title = Title::makeTitle( intval( $row->rc_namespace ), $row->rc_title ); |
444 | 450 | if ( $title ) { |
@@ -458,6 +464,9 @@ discard block |
||
458 | 464 | } |
459 | 465 | } |
460 | 466 | |
467 | + /** |
|
468 | + * @return string |
|
469 | + */ |
|
461 | 470 | protected function feedItemAuthor( $row ) { |
462 | 471 | return isset( $row->rc_user_text ) ? $row->rc_user_text : ''; |
463 | 472 | } |
@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | /** @var Config */ |
40 | 40 | protected $config; |
41 | 41 | |
42 | + /** |
|
43 | + * @param null|Title $title |
|
44 | + */ |
|
42 | 45 | function __construct( $title, Config $config = null ) { |
43 | 46 | if ( is_null( $title ) ) { |
44 | 47 | throw new MWException( __METHOD__ . ' given a null title.' ); |
@@ -1028,6 +1031,9 @@ discard block |
||
1028 | 1031 | return true; |
1029 | 1032 | } |
1030 | 1033 | |
1034 | + /** |
|
1035 | + * @param string|boolean $timestamp |
|
1036 | + */ |
|
1031 | 1037 | private function showRevision( $timestamp ) { |
1032 | 1038 | if ( !preg_match( '/[0-9]{14}/', $timestamp ) ) { |
1033 | 1039 | return; |
@@ -1516,6 +1522,11 @@ discard block |
||
1516 | 1522 | return true; |
1517 | 1523 | } |
1518 | 1524 | |
1525 | + /** |
|
1526 | + * @param null|stdClass $row |
|
1527 | + * @param string|null $earliestLiveTime |
|
1528 | + * @param integer $remaining |
|
1529 | + */ |
|
1519 | 1530 | protected function formatRevisionRow( $row, $earliestLiveTime, $remaining ) { |
1520 | 1531 | $rev = Revision::newFromArchiveRow( $row, |
1521 | 1532 | [ |
@@ -1610,6 +1621,9 @@ discard block |
||
1610 | 1621 | return Xml::tags( 'li', $attribs, $revisionRow ) . "\n"; |
1611 | 1622 | } |
1612 | 1623 | |
1624 | + /** |
|
1625 | + * @param null|stdClass $row |
|
1626 | + */ |
|
1613 | 1627 | private function formatFileRow( $row ) { |
1614 | 1628 | $file = ArchivedFile::newFromRow( $row ); |
1615 | 1629 | $ts = wfTimestamp( TS_MW, $row->fa_timestamp ); |
@@ -1691,7 +1705,7 @@ discard block |
||
1691 | 1705 | /** |
1692 | 1706 | * Fetch image view link if it's available to all users |
1693 | 1707 | * |
1694 | - * @param File|ArchivedFile $file |
|
1708 | + * @param ArchivedFile $file |
|
1695 | 1709 | * @param Title $titleObj |
1696 | 1710 | * @param string $ts A timestamp |
1697 | 1711 | * @param string $key A storage key |
@@ -1727,7 +1741,7 @@ discard block |
||
1727 | 1741 | /** |
1728 | 1742 | * Fetch file's user id if it's available to this user |
1729 | 1743 | * |
1730 | - * @param File|ArchivedFile $file |
|
1744 | + * @param ArchivedFile $file |
|
1731 | 1745 | * @return string HTML fragment |
1732 | 1746 | */ |
1733 | 1747 | function getFileUser( $file ) { |
@@ -1750,7 +1764,7 @@ discard block |
||
1750 | 1764 | /** |
1751 | 1765 | * Fetch file upload comment if it's available to this user |
1752 | 1766 | * |
1753 | - * @param File|ArchivedFile $file |
|
1767 | + * @param ArchivedFile $file |
|
1754 | 1768 | * @return string HTML fragment |
1755 | 1769 | */ |
1756 | 1770 | function getFileComment( $file ) { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @param bool|stdClass $row |
|
43 | + * @param null|stdClass $row |
|
44 | 44 | * @return void |
45 | 45 | */ |
46 | 46 | protected function setCurrent( $row ) { |
@@ -570,8 +570,8 @@ |
||
570 | 570 | /** |
571 | 571 | * Merge page histories |
572 | 572 | * |
573 | - * @param integer $id The page_id |
|
574 | 573 | * @param Title $newTitle The new title |
574 | + * @param stdClass $row |
|
575 | 575 | * @return bool |
576 | 576 | */ |
577 | 577 | private function mergePage( $row, Title $newTitle ) { |
@@ -447,6 +447,9 @@ |
||
447 | 447 | return $vals; |
448 | 448 | } |
449 | 449 | |
450 | + /** |
|
451 | + * @param null|stdClass $row |
|
452 | + */ |
|
450 | 453 | private function continueStr( $row ) { |
451 | 454 | if ( $this->multiUserMode ) { |
452 | 455 | if ( $this->idMode ) { |
@@ -447,6 +447,9 @@ |
||
447 | 447 | return $vals; |
448 | 448 | } |
449 | 449 | |
450 | + /** |
|
451 | + * @param null|stdClass $row |
|
452 | + */ |
|
450 | 453 | private function continueStr( $row ) { |
451 | 454 | if ( $this->multiUserMode ) { |
452 | 455 | if ( $this->idMode ) { |
@@ -447,6 +447,9 @@ |
||
447 | 447 | return $vals; |
448 | 448 | } |
449 | 449 | |
450 | + /** |
|
451 | + * @param null|stdClass $row |
|
452 | + */ |
|
450 | 453 | private function continueStr( $row ) { |
451 | 454 | if ( $this->multiUserMode ) { |
452 | 455 | if ( $this->idMode ) { |
@@ -59,6 +59,9 @@ discard block |
||
59 | 59 | return false; |
60 | 60 | } |
61 | 61 | |
62 | + /** |
|
63 | + * @param string $name |
|
64 | + */ |
|
62 | 65 | function hasConstraint( $name ) { |
63 | 66 | $sql = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n " . |
64 | 67 | "WHERE c.connamespace = n.oid AND conname = '" . |
@@ -1109,6 +1112,10 @@ discard block |
||
1109 | 1112 | return $this->relationExists( $sequence, 'S', $schema ); |
1110 | 1113 | } |
1111 | 1114 | |
1115 | + /** |
|
1116 | + * @param string $table |
|
1117 | + * @param string $trigger |
|
1118 | + */ |
|
1112 | 1119 | function triggerExists( $table, $trigger ) { |
1113 | 1120 | $q = <<<SQL |
1114 | 1121 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
@@ -1132,6 +1139,10 @@ discard block |
||
1132 | 1139 | return $rows; |
1133 | 1140 | } |
1134 | 1141 | |
1142 | + /** |
|
1143 | + * @param string $table |
|
1144 | + * @param string $rule |
|
1145 | + */ |
|
1135 | 1146 | function ruleExists( $table, $rule ) { |
1136 | 1147 | $exists = $this->selectField( 'pg_rules', 'rulename', |
1137 | 1148 | [ |
@@ -1279,7 +1290,7 @@ discard block |
||
1279 | 1290 | * |
1280 | 1291 | * @param array $options An associative array of options to be turned into |
1281 | 1292 | * an SQL query, valid keys are listed in the function. |
1282 | - * @return array |
|
1293 | + * @return string[] |
|
1283 | 1294 | */ |
1284 | 1295 | function makeSelectOptions( $options ) { |
1285 | 1296 | $preLimitTail = $postLimitTail = ''; |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | * objects or LinkCache entries. Uses $wgContentHandlerUseDB to determine |
366 | 366 | * whether to include page_content_model. |
367 | 367 | * |
368 | - * @return array |
|
368 | + * @return string[] |
|
369 | 369 | */ |
370 | 370 | protected static function getSelectFields() { |
371 | 371 | global $wgContentHandlerUseDB, $wgPageLanguageUseDB; |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | * Get the prefixed DB key associated with an ID |
559 | 559 | * |
560 | 560 | * @param int $id The page_id of the article |
561 | - * @return Title|null An object representing the article, or null if no such article was found |
|
561 | + * @return null|string An object representing the article, or null if no such article was found |
|
562 | 562 | */ |
563 | 563 | public static function nameOf( $id ) { |
564 | 564 | $dbr = wfGetDB( DB_REPLICA ); |
@@ -1079,7 +1079,6 @@ discard block |
||
1079 | 1079 | /** |
1080 | 1080 | * Returns true if the title is inside one of the specified namespaces. |
1081 | 1081 | * |
1082 | - * @param int|int[] $namespaces,... The namespaces to check for |
|
1083 | 1082 | * @return bool |
1084 | 1083 | * @since 1.19 |
1085 | 1084 | */ |
@@ -1889,7 +1888,7 @@ discard block |
||
1889 | 1888 | * - quick : does cheap permission checks from replica DBs (usable for GUI creation) |
1890 | 1889 | * - full : does cheap and expensive checks possibly from a replica DB |
1891 | 1890 | * - secure : does cheap and expensive checks, using the master as needed |
1892 | - * @param array $ignoreErrors Array of Strings Set this to a list of message keys |
|
1891 | + * @param string[] $ignoreErrors Array of Strings Set this to a list of message keys |
|
1893 | 1892 | * whose corresponding errors may be ignored. |
1894 | 1893 | * @return array Array of arrays of the arguments to wfMessage to explain permissions problems. |
1895 | 1894 | */ |
@@ -1990,7 +1989,7 @@ discard block |
||
1990 | 1989 | * Add the resulting error code to the errors array |
1991 | 1990 | * |
1992 | 1991 | * @param array $errors List of current errors |
1993 | - * @param array $result Result of errors |
|
1992 | + * @param string $result Result of errors |
|
1994 | 1993 | * |
1995 | 1994 | * @return array List of errors |
1996 | 1995 | */ |
@@ -2385,7 +2384,7 @@ discard block |
||
2385 | 2384 | * |
2386 | 2385 | * @param string $action The action to check |
2387 | 2386 | * @param bool $short Short circuit on first error |
2388 | - * @return array List of errors |
|
2387 | + * @return string[] List of errors |
|
2389 | 2388 | */ |
2390 | 2389 | private function missingPermissionError( $action, $short ) { |
2391 | 2390 | // We avoid expensive display logic for quickUserCan's and such |
@@ -3925,7 +3924,7 @@ discard block |
||
3925 | 3924 | * |
3926 | 3925 | * @param int $revId Revision ID. Get the revision that was before this one. |
3927 | 3926 | * @param int $flags Title::GAID_FOR_UPDATE |
3928 | - * @return int|bool Old revision ID, or false if none exists |
|
3927 | + * @return integer Old revision ID, or false if none exists |
|
3929 | 3928 | */ |
3930 | 3929 | public function getPreviousRevisionID( $revId, $flags = 0 ) { |
3931 | 3930 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_REPLICA ); |
@@ -4065,8 +4064,8 @@ discard block |
||
4065 | 4064 | * Get the number of revisions between the given revision. |
4066 | 4065 | * Used for diffs and other things that really need it. |
4067 | 4066 | * |
4068 | - * @param int|Revision $old Old revision or rev ID (first before range) |
|
4069 | - * @param int|Revision $new New revision or rev ID (first after range) |
|
4067 | + * @param Revision $old Old revision or rev ID (first before range) |
|
4068 | + * @param Revision $new New revision or rev ID (first after range) |
|
4070 | 4069 | * @param int|null $max Limit of Revisions to count, will be incremented to detect truncations |
4071 | 4070 | * @return int Number of revisions between these revisions. |
4072 | 4071 | */ |
@@ -4178,9 +4177,9 @@ discard block |
||
4178 | 4177 | * Used for diffs and other things that really need it. |
4179 | 4178 | * |
4180 | 4179 | * @param int|Revision $old Old revision or rev ID (first before range by default) |
4181 | - * @param int|Revision $new New revision or rev ID (first after range by default) |
|
4180 | + * @param Revision $new New revision or rev ID (first after range by default) |
|
4182 | 4181 | * @param int $limit Maximum number of authors |
4183 | - * @param string|array $options (Optional): Single option, or an array of options: |
|
4182 | + * @param string $options (Optional): Single option, or an array of options: |
|
4184 | 4183 | * 'include_old' Include $old in the range; $new is excluded. |
4185 | 4184 | * 'include_new' Include $new in the range; $old is excluded. |
4186 | 4185 | * 'include_both' Include both $old and $new in the range. |
@@ -4336,7 +4335,7 @@ discard block |
||
4336 | 4335 | /** |
4337 | 4336 | * Get the default message text or false if the message doesn't exist |
4338 | 4337 | * |
4339 | - * @return string|bool |
|
4338 | + * @return false|string |
|
4340 | 4339 | */ |
4341 | 4340 | public function getDefaultMessageText() { |
4342 | 4341 | global $wgContLang; |
@@ -4784,7 +4783,7 @@ discard block |
||
4784 | 4783 | } |
4785 | 4784 | |
4786 | 4785 | /** |
4787 | - * @return array |
|
4786 | + * @return string[] |
|
4788 | 4787 | */ |
4789 | 4788 | public function __sleep() { |
4790 | 4789 | return [ |