@@ -234,7 +234,7 @@ |
||
| 234 | 234 | * @param string $title |
| 235 | 235 | * |
| 236 | 236 | * @throws ApiUsageException If no such entity is found. |
| 237 | - * @return EntityId The ID of the entity connected to $title on $site. |
|
| 237 | + * @return null|\Wikibase\DataModel\Entity\ItemId The ID of the entity connected to $title on $site. |
|
| 238 | 238 | */ |
| 239 | 239 | private function getEntityIdFromSiteTitleCombination( $site, $title ) { |
| 240 | 240 | if ( $this->siteLinkLookup ) { |
@@ -173,6 +173,9 @@ |
||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | + /** |
|
| 177 | + * @param string $name |
|
| 178 | + */ |
|
| 176 | 179 | private function addEntityToOutput( EntityRevision $entityRevision, $name ) { |
| 177 | 180 | $entityId = $entityRevision->getEntity()->getId(); |
| 178 | 181 | $revisionId = $entityRevision->getRevisionId(); |
@@ -1058,7 +1058,7 @@ |
||
| 1058 | 1058 | * @see ApiResult::addValue() |
| 1059 | 1059 | * |
| 1060 | 1060 | * @param Status $status The status to get the revision ID from. |
| 1061 | - * @param string|null|array $path Where in the result to put the revision id |
|
| 1061 | + * @param string $path Where in the result to put the revision id |
|
| 1062 | 1062 | * @param int|null $oldRevId The id of the latest revision of the entity before |
| 1063 | 1063 | * the last (possibly null) edit |
| 1064 | 1064 | */ |
@@ -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 |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | /** |
| 1214 | 1214 | * Get the mapping of entity types => content models |
| 1215 | 1215 | * |
| 1216 | - * @return array |
|
| 1216 | + * @return string[] |
|
| 1217 | 1217 | */ |
| 1218 | 1218 | public function getContentModelMappings() { |
| 1219 | 1219 | $map = $this->entityTypeDefinitions->getContentModelIds(); |
@@ -1233,7 +1233,7 @@ discard block |
||
| 1233 | 1233 | } |
| 1234 | 1234 | |
| 1235 | 1235 | /** |
| 1236 | - * @return string[] List of entity type identifiers (typically "item" and "property") |
|
| 1236 | + * @return integer[] List of entity type identifiers (typically "item" and "property") |
|
| 1237 | 1237 | * that are configured in WikibaseRepo.entitytypes.php and enabled via the |
| 1238 | 1238 | * $wgWBRepoSettings['entityNamespaces'] setting. Optionally the list also contains |
| 1239 | 1239 | * entity types from the configured foreign repositories. |
@@ -1261,7 +1261,7 @@ discard block |
||
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | 1263 | /** |
| 1264 | - * @return string[] List of entity type identifiers (typically "item" and "property") |
|
| 1264 | + * @return integer[] List of entity type identifiers (typically "item" and "property") |
|
| 1265 | 1265 | * that are configured in WikibaseRepo.entitytypes.php and enabled via the |
| 1266 | 1266 | * $wgWBRepoSettings['entityNamespaces'] setting. |
| 1267 | 1267 | */ |
@@ -1792,6 +1792,9 @@ discard block |
||
| 1792 | 1792 | return new EntityTypesConfigValueProvider( $this->entityTypeDefinitions ); |
| 1793 | 1793 | } |
| 1794 | 1794 | |
| 1795 | + /** |
|
| 1796 | + * @param string $name |
|
| 1797 | + */ |
|
| 1795 | 1798 | private function fixLegacyContentModelSetting( array $setting, $name ) { |
| 1796 | 1799 | if ( isset( $setting[ 'wikibase-item' ] ) || isset( $setting[ 'wikibase-property' ] ) ) { |
| 1797 | 1800 | wfWarn( "The specified value for the Wikibase setting '$name' uses content model ids as keys. This is deprecated. " . |
@@ -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, |