@@ -371,7 +371,7 @@ |
||
| 371 | 371 | * Do all updates and commit them. More or less a replacement |
| 372 | 372 | * for the original initStats, but without output. |
| 373 | 373 | * |
| 374 | - * @param IDatabase|bool $database |
|
| 374 | + * @param Database|null $database |
|
| 375 | 375 | * - boolean: Whether to use the master DB |
| 376 | 376 | * - IDatabase: Database connection to use |
| 377 | 377 | * @param array $options Array of options, may contain the following values |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | /** |
| 108 | 108 | * Create a FormOptions object with options as specified by the user |
| 109 | 109 | * |
| 110 | - * @param array $parameters |
|
| 110 | + * @param string $parameters |
|
| 111 | 111 | * |
| 112 | 112 | * @return FormOptions |
| 113 | 113 | */ |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | /** |
| 338 | 338 | * Return a IDatabase object for reading |
| 339 | 339 | * |
| 340 | - * @return IDatabase |
|
| 340 | + * @return Database|null |
|
| 341 | 341 | */ |
| 342 | 342 | protected function getDB() { |
| 343 | 343 | return wfGetDB( DB_REPLICA ); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * Subclasses return an array of fields to order by here. Don't append |
| 162 | 162 | * DESC to the field names, that'll be done automatically if |
| 163 | 163 | * sortDescending() returns true. |
| 164 | - * @return array |
|
| 164 | + * @return string[] |
|
| 165 | 165 | * @since 1.18 |
| 166 | 166 | */ |
| 167 | 167 | function getOrderFields() { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | |
| 374 | 374 | /** |
| 375 | 375 | * Get a DB connection to be used for slow recache queries |
| 376 | - * @return IDatabase |
|
| 376 | + * @return Database|null |
|
| 377 | 377 | */ |
| 378 | 378 | function getRecacheDB() { |
| 379 | 379 | return wfGetDB( DB_REPLICA, [ $this->getName(), 'QueryPage::recache', 'vslow' ] ); |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | /** |
| 435 | 435 | * Somewhat deprecated, you probably want to be using execute() |
| 436 | 436 | * @param int|bool $offset |
| 437 | - * @param int|bool $limit |
|
| 437 | + * @param integer $limit |
|
| 438 | 438 | * @return ResultWrapper |
| 439 | 439 | */ |
| 440 | 440 | public function doQuery( $offset = false, $limit = false ) { |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | /** |
| 776 | 776 | * Override for custom handling. If the titles/links are ok, just do |
| 777 | 777 | * feedItemDesc() |
| 778 | - * @param object $row |
|
| 778 | + * @param null|stdClass $row |
|
| 779 | 779 | * @return FeedItem|null |
| 780 | 780 | */ |
| 781 | 781 | function feedResult( $row ) { |
@@ -807,6 +807,9 @@ discard block |
||
| 807 | 807 | return isset( $row->comment ) ? htmlspecialchars( $row->comment ) : ''; |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | + /** |
|
| 811 | + * @return string |
|
| 812 | + */ |
|
| 810 | 813 | function feedItemAuthor( $row ) { |
| 811 | 814 | return isset( $row->user_text ) ? $row->user_text : ''; |
| 812 | 815 | } |
@@ -35,6 +35,9 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | protected $mNavigationBar; |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string|null $target |
|
| 40 | + */ |
|
| 38 | 41 | function __construct( IContextSource $context, $target, $namespace = false ) { |
| 39 | 42 | parent::__construct( $context ); |
| 40 | 43 | $msgs = [ 'deletionlog', 'undeleteviewlink', 'diff' ]; |
@@ -347,7 +350,7 @@ discard block |
||
| 347 | 350 | /** |
| 348 | 351 | * Get the Database object in use |
| 349 | 352 | * |
| 350 | - * @return IDatabase |
|
| 353 | + * @return Database|null |
|
| 351 | 354 | */ |
| 352 | 355 | public function getDatabase() { |
| 353 | 356 | return $this->mDb; |
@@ -296,6 +296,9 @@ discard block |
||
| 296 | 296 | ); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | + /** |
|
| 300 | + * @param FormOptions $opts |
|
| 301 | + */ |
|
| 299 | 302 | protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, |
| 300 | 303 | &$join_conds, $opts |
| 301 | 304 | ) { |
@@ -310,7 +313,7 @@ discard block |
||
| 310 | 313 | /** |
| 311 | 314 | * Return a IDatabase object for reading |
| 312 | 315 | * |
| 313 | - * @return IDatabase |
|
| 316 | + * @return Database|null |
|
| 314 | 317 | */ |
| 315 | 318 | protected function getDB() { |
| 316 | 319 | return wfGetDB( DB_REPLICA, 'watchlist' ); |
@@ -534,6 +537,9 @@ discard block |
||
| 534 | 537 | $this->setBottomText( $opts ); |
| 535 | 538 | } |
| 536 | 539 | |
| 540 | + /** |
|
| 541 | + * @param FormOptions $options |
|
| 542 | + */ |
|
| 537 | 543 | function cutoffselector( $options ) { |
| 538 | 544 | // Cast everything to strings immediately, so that we know all of the values have the same |
| 539 | 545 | // precision, and can be compared with '==='. 2/24 has a few more decimal places than its |
@@ -648,7 +654,7 @@ discard block |
||
| 648 | 654 | * The assumption made here is that when a subject page is watched a talk page is also watched. |
| 649 | 655 | * Hence the number of individual items is halved. |
| 650 | 656 | * |
| 651 | - * @return int |
|
| 657 | + * @return double |
|
| 652 | 658 | */ |
| 653 | 659 | protected function countItems() { |
| 654 | 660 | $store = MediaWikiServices::getInstance()->getWatchedItemStore(); |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | * |
| 147 | 147 | * @param string $database |
| 148 | 148 | * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases |
| 149 | - * @return IDatabase|null If invalid selection |
|
| 149 | + * @return Database|null If invalid selection |
|
| 150 | 150 | */ |
| 151 | 151 | public static function getDB( $database, $ignoreInvalidDB = false ) { |
| 152 | 152 | global $wgDBname; |
@@ -152,6 +152,10 @@ |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /* Core function which does whatever the maintenance script is designed to do */ |
| 155 | + |
|
| 156 | + /** |
|
| 157 | + * @param Database $rev |
|
| 158 | + */ |
|
| 155 | 159 | abstract public function processRevision( $rev ); |
| 156 | 160 | } |
| 157 | 161 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | /** |
| 296 | 296 | * Get an argument. |
| 297 | 297 | * @param int $argId The integer value (from zero) for the arg |
| 298 | - * @param mixed $default The default if it doesn't exist |
|
| 298 | + * @param string $default The default if it doesn't exist |
|
| 299 | 299 | * @return mixed |
| 300 | 300 | */ |
| 301 | 301 | protected function getArg( $argId = 0, $default = null ) { |
@@ -1344,6 +1344,7 @@ discard block |
||
| 1344 | 1344 | * Unlock and lock again |
| 1345 | 1345 | * Since the lock is low-priority, queued reads will be able to complete |
| 1346 | 1346 | * @param Database &$db |
| 1347 | + * @param Database $db |
|
| 1347 | 1348 | */ |
| 1348 | 1349 | private function relockSearchindex( $db ) { |
| 1349 | 1350 | $this->unlockSearchindex( $db ); |
@@ -39,6 +39,9 @@ |
||
| 39 | 39 | private $failed; |
| 40 | 40 | private $outputCallback; |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param Database $database |
|
| 44 | + */ |
|
| 42 | 45 | function __construct( &$database, $outputCallback ) { |
| 43 | 46 | $this->db = $database; |
| 44 | 47 | $this->outputCallback = $outputCallback; |