@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | /** |
| 302 | 302 | * @see ContentHandler::makeParserOptions |
| 303 | 303 | * |
| 304 | - * @param IContextSource|User|string $context |
|
| 304 | + * @param string $context |
|
| 305 | 305 | * |
| 306 | 306 | * @return ParserOptions |
| 307 | 307 | */ |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | * @param Revision $newerRevision The revision to undo |
| 576 | 576 | * @param Revision $olderRevision Must be an earlier revision than $undo |
| 577 | 577 | * |
| 578 | - * @return Content|bool Content on success, false on failure |
|
| 578 | + * @return null|Content Content on success, false on failure |
|
| 579 | 579 | */ |
| 580 | 580 | public function getUndoContent( |
| 581 | 581 | Revision $latestRevision, |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | * @param EntityContent $content |
| 633 | 633 | * @param Title $title |
| 634 | 634 | * |
| 635 | - * @return DataUpdate[] |
|
| 635 | + * @return DataUpdateAdapter[] |
|
| 636 | 636 | */ |
| 637 | 637 | public function getEntityDeletionUpdates( EntityContent $content, Title $title ) { |
| 638 | 638 | $updates = array(); |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | * @param EntityContent $content |
| 672 | 672 | * @param Title $title |
| 673 | 673 | * |
| 674 | - * @return DataUpdate[] |
|
| 674 | + * @return DataUpdateAdapter[] |
|
| 675 | 675 | */ |
| 676 | 676 | public function getEntityModificationUpdates( EntityContent $content, Title $title ) { |
| 677 | 677 | $updates = array(); |
@@ -174,6 +174,9 @@ |
||
| 174 | 174 | $this->timestamp = (int)$timestamp; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | + /** |
|
| 178 | + * @param string $name |
|
| 179 | + */ |
|
| 177 | 180 | private static function getRdfWriter( $name ) { |
| 178 | 181 | $factory = new RdfWriterFactory(); |
| 179 | 182 | $format = $factory->getFormatName( $name ); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * @param string|null $summary |
| 280 | 280 | * @param bool $bot |
| 281 | 281 | * |
| 282 | - * @return array A list of exactly two EntityRevision objects. The first one represents the |
|
| 282 | + * @return \Wikibase\EntityRevision[] A list of exactly two EntityRevision objects. The first one represents the |
|
| 283 | 283 | * modified source item, the second one represents the modified target item. |
| 284 | 284 | */ |
| 285 | 285 | private function attemptSaveMerge( Item $fromItem, Item $toItem, $summary, $bot ) { |
@@ -292,6 +292,9 @@ discard block |
||
| 292 | 292 | return array( $fromRev, $toRev ); |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | + /** |
|
| 296 | + * @param boolean $bot |
|
| 297 | + */ |
|
| 295 | 298 | private function saveItem( Item $item, Summary $summary, $bot ) { |
| 296 | 299 | // Given we already check all constraints in ChangeOpsMerge, it's |
| 297 | 300 | // fine to ignore them here. This is also needed to not run into |
@@ -52,6 +52,9 @@ |
||
| 52 | 52 | $this->assertInstanceOf( SubmitEntityAction::class, $action ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $key |
|
| 57 | + */ |
|
| 55 | 58 | protected function adjustRevisionParam( $key, array &$params, WikiPage $page ) { |
| 56 | 59 | if ( !isset( $params[$key] ) || ( is_int( $params[$key] ) && $params[$key] > 0 ) ) { |
| 57 | 60 | return; |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | $this->stashMwGlobals( 'wgUser' ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param string $action |
|
| 32 | + */ |
|
| 30 | 33 | protected function doPermissionsTest( |
| 31 | 34 | $action, |
| 32 | 35 | array $params, |
@@ -110,6 +110,9 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string|null $statementGuid |
|
| 115 | + */ |
|
| 113 | 116 | protected function makeValidRequest( $statementGuid, array $hashes ) { |
| 114 | 117 | $params = array( |
| 115 | 118 | 'action' => 'wbremovequalifiers', |
@@ -125,6 +128,9 @@ discard block |
||
| 125 | 128 | $this->makeInvalidRequest( $statementGuid, $hashes, 'no-such-qualifier' ); |
| 126 | 129 | } |
| 127 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $expectedError |
|
| 133 | + */ |
|
| 128 | 134 | protected function makeInvalidRequest( $statementGuid, array $hashes, $expectedError = null ) { |
| 129 | 135 | $params = array( |
| 130 | 136 | 'action' => 'wbremovequalifiers', |
@@ -101,6 +101,8 @@ |
||
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * Gets a "lagged" database connection: We always leave out the first row on select. |
| 104 | + * @param integer $selectCount |
|
| 105 | + * @param integer $selectRowCount |
|
| 104 | 106 | */ |
| 105 | 107 | private function getLaggedDatabase( Database $realDB, $selectCount, $selectRowCount ) { |
| 106 | 108 | $db = $this->getMockBuilder( Database::class ) |
@@ -166,6 +166,9 @@ |
||
| 166 | 166 | return $mockDataTypeLookup; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | + /** |
|
| 170 | + * @param string $string |
|
| 171 | + */ |
|
| 169 | 172 | private function fixLineEndings( $string ) { |
| 170 | 173 | return preg_replace( '~(*BSR_ANYCRLF)\R~', "\n", $string ); |
| 171 | 174 | } |
@@ -112,6 +112,9 @@ |
||
| 112 | 112 | ); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + /** |
|
| 116 | + * @param string $languageCode |
|
| 117 | + */ |
|
| 115 | 118 | protected function getHeadingHtml( |
| 116 | 119 | $languageCode, |
| 117 | 120 | EntityId $entityId = null, |