@@ -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' => 'wbremovereferences', |
@@ -125,6 +128,9 @@ discard block |
||
125 | 128 | $this->makeInvalidRequest( $statementGuid, $hashes, 'no-such-reference' ); |
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' => 'wbremovereferences', |
@@ -161,6 +161,10 @@ |
||
161 | 161 | $this->makeSetQualifierRequest( $guid, $hash, $newQualifier, $item->getId() ); |
162 | 162 | } |
163 | 163 | |
164 | + /** |
|
165 | + * @param string|null $statementGuid |
|
166 | + * @param null|string $snakhash |
|
167 | + */ |
|
164 | 168 | protected function makeSetQualifierRequest( $statementGuid, $snakhash, Snak $qualifier, EntityId $entityId ) { |
165 | 169 | $params = array( |
166 | 170 | 'action' => 'wbsetqualifier', |
@@ -230,6 +230,12 @@ |
||
230 | 230 | return $serializedReference; |
231 | 231 | } |
232 | 232 | |
233 | + /** |
|
234 | + * @param string|null $referenceHash |
|
235 | + * @param string $snaksJson |
|
236 | + * @param string $snaksOrderJson |
|
237 | + * @param string $expectedErrorCode |
|
238 | + */ |
|
233 | 239 | protected function makeInvalidRequest( |
234 | 240 | $statementGuid, |
235 | 241 | $referenceHash, |
@@ -111,7 +111,7 @@ |
||
111 | 111 | * not be used while testing. |
112 | 112 | * |
113 | 113 | * @param string $dataSetName |
114 | - * @param string[]|string $lines |
|
114 | + * @param string $lines |
|
115 | 115 | * @param string $suffix File name suffix |
116 | 116 | * |
117 | 117 | * @return bool|int the number of bytes that were written to the file, or |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
206 | - * @param array $termsByLanguage |
|
206 | + * @param string[] $termsByLanguage |
|
207 | 207 | * |
208 | 208 | * @return string[]|null |
209 | 209 | */ |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * |
225 | 225 | * @param Title|null $currentTitle |
226 | 226 | * @param RequestContext $context |
227 | - * @return bool |
|
227 | + * @return null|boolean |
|
228 | 228 | */ |
229 | 229 | private function shouldConvert( Title $currentTitle = null, RequestContext $context ) { |
230 | 230 | static $shouldConvert = null; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * @param string $type |
64 | 64 | * @param TermSearchResult[] $returnResults |
65 | 65 | * |
66 | - * @return TermIndexSearchInteractor|\PHPUnit_Framework_MockObject_MockObject |
|
66 | + * @return TermIndexSearchInteractor |
|
67 | 67 | */ |
68 | 68 | private function getMockSearchInteractor( $search, $language, $type, array $returnResults = array() ) { |
69 | 69 | $mock = $this->getMockBuilder( 'Wikibase\Lib\Interactors\TermIndexSearchInteractor' ) |
@@ -91,6 +91,10 @@ discard block |
||
91 | 91 | $this->assertRegExp( $pattern . 'm', $text ); |
92 | 92 | } |
93 | 93 | |
94 | + /** |
|
95 | + * @param string $lang |
|
96 | + * @param string $text |
|
97 | + */ |
|
94 | 98 | private function setLabel( EntityDocument $entity, $lang, $text ) { |
95 | 99 | if ( $entity instanceof FingerprintProvider ) { |
96 | 100 | $entity->getFingerprint()->setLabel( $lang, $text ); |
@@ -444,6 +448,9 @@ discard block |
||
444 | 448 | $this->assertDataUpdates( $updates ); |
445 | 449 | } |
446 | 450 | |
451 | + /** |
|
452 | + * @param \Wikibase\Updates\DataUpdateAdapter[] $updates |
|
453 | + */ |
|
447 | 454 | private function assertDataUpdates( $updates ) { |
448 | 455 | $this->assertInternalType( 'array', $updates ); |
449 | 456 | $this->assertContainsOnlyInstancesOf( 'DataUpdate', $updates ); |
@@ -302,6 +302,13 @@ |
||
302 | 302 | return $parser; |
303 | 303 | } |
304 | 304 | |
305 | + /** |
|
306 | + * @param string $languageCode |
|
307 | + * @param string $userLanguageCode |
|
308 | + * @param boolean $interfaceMessage |
|
309 | + * @param boolean $disableContentConversion |
|
310 | + * @param boolean $disableTitleConversion |
|
311 | + */ |
|
305 | 312 | private function getParserOptions( $languageCode, $userLanguageCode, $interfaceMessage, |
306 | 313 | $disableContentConversion, $disableTitleConversion |
307 | 314 | ) { |
@@ -112,7 +112,7 @@ |
||
112 | 112 | |
113 | 113 | /** |
114 | 114 | * @param SpecialRedirectEntity $page |
115 | - * @param User $user |
|
115 | + * @param User|null $user |
|
116 | 116 | */ |
117 | 117 | private function overrideServices( SpecialRedirectEntity $page, User $user ) { |
118 | 118 | $wikibaseRepo = WikibaseRepo::getDefaultInstance(); |