@@ -87,6 +87,10 @@ discard block |
||
| 87 | 87 | $this->assertSame( $expected, $entityContent->getTextForSearchIndex() ); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $languageCode |
|
| 92 | + * @param string $text |
|
| 93 | + */ |
|
| 90 | 94 | private function setLabel( EntityDocument $entity, $languageCode, $text ) { |
| 91 | 95 | if ( !( $entity instanceof LabelsProvider ) ) { |
| 92 | 96 | throw new InvalidArgumentException( '$entity must be a LabelsProvider' ); |
@@ -408,6 +412,9 @@ discard block |
||
| 408 | 412 | $this->assertDataUpdates( $updates ); |
| 409 | 413 | } |
| 410 | 414 | |
| 415 | + /** |
|
| 416 | + * @param \Wikibase\Repo\Content\DataUpdateAdapter[] $updates |
|
| 417 | + */ |
|
| 411 | 418 | private function assertDataUpdates( $updates ) { |
| 412 | 419 | $this->assertInternalType( 'array', $updates ); |
| 413 | 420 | $this->assertContainsOnlyInstancesOf( 'DataUpdate', $updates ); |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | - * @return Site |
|
| 115 | + * @return string |
|
| 116 | 116 | */ |
| 117 | 117 | private function getLocalSite() { |
| 118 | 118 | return $this->siteLookup->getSite( $this->localSiteId ); |
@@ -1307,6 +1307,9 @@ |
||
| 1307 | 1307 | ); |
| 1308 | 1308 | } |
| 1309 | 1309 | |
| 1310 | + /** |
|
| 1311 | + * @param string $name |
|
| 1312 | + */ |
|
| 1310 | 1313 | private function fixLegacyContentModelSetting( array $setting, $name ) { |
| 1311 | 1314 | if ( isset( $setting[ 'wikibase-item' ] ) || isset( $setting[ 'wikibase-property' ] ) ) { |
| 1312 | 1315 | wfWarn( "The specified value for the Wikibase setting '$name' uses content model ids as keys. This is deprecated. " . |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | /** |
| 67 | 67 | * @param string $text |
| 68 | 68 | * |
| 69 | - * @return Title |
|
| 69 | + * @return EntityChange |
|
| 70 | 70 | */ |
| 71 | 71 | private function getTitleMock( $text ) { |
| 72 | 72 | $title = $this->getMockBuilder( Title::class ) |
@@ -206,6 +206,9 @@ |
||
| 206 | 206 | $this->assertFalse( $cacheSplit ); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | + /** |
|
| 210 | + * @return RepoLinker |
|
| 211 | + */ |
|
| 209 | 212 | private function getRepoLinker() { |
| 210 | 213 | $repoLinker = $this->getMockBuilder( RepoLinker::class ) |
| 211 | 214 | ->disableOriginalConstructor() |
@@ -75,6 +75,9 @@ |
||
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param EntityUsage[] $actualUsages |
|
| 80 | + */ |
|
| 78 | 81 | private function hasUsage( $actualUsages, EntityId $entityId, $aspect ) { |
| 79 | 82 | $usage = new EntityUsage( $entityId, $aspect ); |
| 80 | 83 | $key = $usage->getIdentityString(); |
@@ -227,6 +227,9 @@ |
||
| 227 | 227 | return $languageFallbackChain; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | + /** |
|
| 231 | + * @param string $languageCode |
|
| 232 | + */ |
|
| 230 | 233 | private function getBabel( $languageCode, $user ) { |
| 231 | 234 | $babel = array(); |
| 232 | 235 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param string|null $moduleName The module part of the auto comment |
| 47 | 47 | * @param string|null $actionName The action part of the auto comment |
| 48 | 48 | * @param string|null $languageCode The language code to use as the second auto comment argument |
| 49 | - * @param array $commentArgs The arguments to the auto comment |
|
| 49 | + * @param string[] $commentArgs The arguments to the auto comment |
|
| 50 | 50 | * @param array $summaryArgs The arguments to the auto summary |
| 51 | 51 | */ |
| 52 | 52 | public function __construct( |
@@ -153,7 +153,6 @@ discard block |
||
| 153 | 153 | /** |
| 154 | 154 | * Add auto comment arguments. |
| 155 | 155 | * |
| 156 | - * @param mixed $args,... Parts to be stringed together |
|
| 157 | 156 | */ |
| 158 | 157 | public function addAutoCommentArgs( $args /*...*/ ) { |
| 159 | 158 | if ( !is_array( $args ) ) { |
@@ -166,7 +165,6 @@ discard block |
||
| 166 | 165 | /** |
| 167 | 166 | * Add arguments to the summary part. |
| 168 | 167 | * |
| 169 | - * @param mixed $args,... Parts to be stringed together |
|
| 170 | 168 | */ |
| 171 | 169 | public function addAutoSummaryArgs( $args /*...*/ ) { |
| 172 | 170 | if ( !is_array( $args ) ) { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | * |
| 233 | 233 | * @param EntityDocument $entity |
| 234 | 234 | * @param int $revisionId |
| 235 | - * @param int|string $timestamp |
|
| 235 | + * @param integer $timestamp |
|
| 236 | 236 | * @param User|string|null $user |
| 237 | 237 | * |
| 238 | 238 | * @throws StorageException |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * |
| 296 | 296 | * @param EntityRedirect $redirect |
| 297 | 297 | * @param int $revisionId |
| 298 | - * @param string|int $timestamp |
|
| 298 | + * @param integer $timestamp |
|
| 299 | 299 | * |
| 300 | 300 | * @throws StorageException |
| 301 | 301 | */ |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | /** |
| 645 | 645 | * @param string $idString |
| 646 | 646 | * |
| 647 | - * @return ItemId|PropertyId |
|
| 647 | + * @return EntityId |
|
| 648 | 648 | */ |
| 649 | 649 | private function parseId( $idString ) { |
| 650 | 650 | $parser = new BasicEntityIdParser(); |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | |
| 654 | 654 | /** |
| 655 | 655 | * @param int $revisionId |
| 656 | - * @param EntityId|string $entityId |
|
| 656 | + * @param EntityId $entityId |
|
| 657 | 657 | * @param string $summary |
| 658 | 658 | * @param User|string $user |
| 659 | 659 | */ |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | * Returns the newest (according to the revision id) log entry |
| 691 | 691 | * for the given entity. |
| 692 | 692 | * |
| 693 | - * @param EntityId|string $entityId |
|
| 693 | + * @param ItemId $entityId |
|
| 694 | 694 | * |
| 695 | 695 | * @return array|null An associative array containing the fields |
| 696 | 696 | * 'revision', 'entity', 'summary', and 'user'. |