@@ -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 DatabaseBase|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 DatabaseBase|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(); |
@@ -117,10 +117,16 @@ |
||
117 | 117 | return $this->repo->getRootDirectory() . '/' . $this->repo->getHashPath( $name ) . $name; |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param Database|null $db |
|
122 | + */ |
|
120 | 123 | private function imageExists( $name, $db ) { |
121 | 124 | return $db->selectField( 'image', '1', [ 'img_name' => $name ], __METHOD__ ); |
122 | 125 | } |
123 | 126 | |
127 | + /** |
|
128 | + * @param Database|null $db |
|
129 | + */ |
|
124 | 130 | private function pageExists( $name, $db ) { |
125 | 131 | return $db->selectField( |
126 | 132 | 'page', |
@@ -66,6 +66,9 @@ |
||
66 | 66 | return $this->updateSearchIndexForPage( $dbw, $row->si_page ); |
67 | 67 | } |
68 | 68 | |
69 | + /** |
|
70 | + * @param Database|null $dbw |
|
71 | + */ |
|
69 | 72 | private function findRows( $dbw ) { |
70 | 73 | $searchindex = $dbw->tableName( 'searchindex' ); |
71 | 74 | $regexp = '[[:<:]]u8efbd([89][1-9a]|8[b-f]|90)[[:>:]]'; |
@@ -121,6 +121,9 @@ |
||
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param Database|null $dbw |
|
126 | + */ |
|
124 | 127 | public function doSpecialPageCacheUpdates( $dbw ) { |
125 | 128 | global $wgSpecialPageCacheUpdates; |
126 | 129 |