@@ -62,6 +62,9 @@ |
||
62 | 62 | ); |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param string $dataSetName |
|
67 | + */ |
|
65 | 68 | private function assertOrCreateNTriples( $dataSetName, RdfWriter $writer ) { |
66 | 69 | $actual = $writer->drain(); |
67 | 70 | $expected = $this->getTestData()->getNTriples( $dataSetName ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * Fetches a value from the cache. |
59 | 59 | * |
60 | 60 | * @param string $key The unique key of this item in the cache. |
61 | - * @param mixed $default Default value to return if the key does not exist. |
|
61 | + * @param string $default Default value to return if the key does not exist. |
|
62 | 62 | * |
63 | 63 | * @return mixed The value of the item from the cache, or $default in case of cache miss. |
64 | 64 | * |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. |
81 | 81 | * |
82 | 82 | * @param string $key The key of the item to store. |
83 | - * @param mixed $value The value of the item to store, must be serializable. |
|
84 | - * @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and |
|
83 | + * @param string $value The value of the item to store, must be serializable. |
|
84 | + * @param integer $ttl Optional. The TTL value of this item. If no value is sent and |
|
85 | 85 | * the driver supports TTL then the library may set a default value |
86 | 86 | * for it or let the driver take care of that. |
87 | 87 | * |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * Obtains multiple cache items by their unique keys. |
130 | 130 | * |
131 | - * @param iterable $keys A list of keys that can obtained in a single operation. |
|
132 | - * @param mixed $default Default value to return for keys that do not exist. |
|
131 | + * @param string[] $keys A list of keys that can obtained in a single operation. |
|
132 | + * @param string $default Default value to return for keys that do not exist. |
|
133 | 133 | * |
134 | 134 | * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
135 | 135 | * |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * Persists a set of key => value pairs in the cache, with an optional TTL. |
170 | 170 | * |
171 | 171 | * @param iterable $values A list of key => value pairs for a multiple-set operation. |
172 | - * @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and |
|
172 | + * @param integer $ttl Optional. The TTL value of this item. If no value is sent and |
|
173 | 173 | * the driver supports TTL then the library may set a default value |
174 | 174 | * for it or let the driver take care of that. |
175 | 175 | * |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | } |
525 | 525 | |
526 | 526 | /** |
527 | - * @return TermBuffer|AliasTermBuffer |
|
527 | + * @return null|TermBuffer |
|
528 | 528 | */ |
529 | 529 | public function getTermBuffer() { |
530 | 530 | if ( !$this->termBuffer ) { |
@@ -1526,6 +1526,9 @@ discard block |
||
1526 | 1526 | return $this->referenceFormatterFactory; |
1527 | 1527 | } |
1528 | 1528 | |
1529 | + /** |
|
1530 | + * @param string $cacheKey |
|
1531 | + */ |
|
1529 | 1532 | private function getCachedDatabasePropertyLabelResolver( |
1530 | 1533 | $languageCode, |
1531 | 1534 | $cache, |
@@ -535,6 +535,9 @@ discard block |
||
535 | 535 | $this->assertSame( [], $usages ); |
536 | 536 | } |
537 | 537 | |
538 | + /** |
|
539 | + * @return UsageLookup |
|
540 | + */ |
|
538 | 541 | private function getSiteLinkUsageLookup() { |
539 | 542 | $pageEntityUsages = [ new PageEntityUsages( 1, [] ) ]; |
540 | 543 | $mock = $this->createMock( UsageLookup::class ); |
@@ -639,6 +642,9 @@ discard block |
||
639 | 642 | return $strings; |
640 | 643 | } |
641 | 644 | |
645 | + /** |
|
646 | + * @param PageEntityUsages[] $actual |
|
647 | + */ |
|
642 | 648 | private function assertPageEntityUsages( $expected, $actual, $message = '' ) { |
643 | 649 | $this->assertEquals( |
644 | 650 | $this->getPageEntityUsageStrings( $expected ), |
@@ -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() |
@@ -140,7 +140,7 @@ |
||
140 | 140 | /** |
141 | 141 | * @param ItemId $id |
142 | 142 | * @param string[] $labels |
143 | - * @param Statement[]|null $statements |
|
143 | + * @param Statement[] $statements |
|
144 | 144 | * @param SiteLink[]|null $siteLinks |
145 | 145 | * |
146 | 146 | * @return Item |
@@ -295,6 +295,13 @@ discard block |
||
295 | 295 | return $parser; |
296 | 296 | } |
297 | 297 | |
298 | + /** |
|
299 | + * @param string $languageCode |
|
300 | + * @param string $userLanguageCode |
|
301 | + * @param boolean $interfaceMessage |
|
302 | + * @param boolean $disableContentConversion |
|
303 | + * @param boolean $disableTitleConversion |
|
304 | + */ |
|
298 | 305 | private function getParserOptions( $languageCode, $userLanguageCode, $interfaceMessage, |
299 | 306 | $disableContentConversion, $disableTitleConversion |
300 | 307 | ) { |
@@ -310,6 +317,9 @@ discard block |
||
310 | 317 | return $parserOptions; |
311 | 318 | } |
312 | 319 | |
320 | + /** |
|
321 | + * @return LanguageFallbackLabelDescriptionLookupFactory |
|
322 | + */ |
|
313 | 323 | private function getLanguageFallbackLabelDescriptionLookupFactory() { |
314 | 324 | $languageFallbackLabelDescriptionLookup = $this->getMockBuilder( LanguageFallbackLabelDescriptionLookup::class ) |
315 | 325 | ->disableOriginalConstructor() |
@@ -82,6 +82,9 @@ |
||
82 | 82 | ); |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param EntityUsage[] $actualUsages |
|
87 | + */ |
|
85 | 88 | private function hasUsage( $actualUsages, EntityId $entityId, $aspect, $modifier = null ) { |
86 | 89 | $usage = new EntityUsage( $entityId, $aspect, $modifier ); |
87 | 90 | $key = $usage->getIdentityString(); |
@@ -106,8 +106,8 @@ |
||
106 | 106 | |
107 | 107 | /** |
108 | 108 | * @param string $baseURL |
109 | - * @param string $text |
|
110 | 109 | * @param string|null $earliestRevTimestamp |
110 | + * @param string $titleText |
|
111 | 111 | * @return Title |
112 | 112 | */ |
113 | 113 | private function mockTitle( $baseURL, $titleText, $earliestRevTimestamp = null ) { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use File; |
6 | 6 | use Title; |
7 | - |
|
8 | 7 | use Wikibase\Client\Hooks\SkinAfterBottomScriptsHandler; |
9 | 8 | use Wikibase\Client\RepoLinker; |
10 | 9 | use Wikibase\Client\WikibaseClient; |