@@ -149,7 +149,7 @@ |
||
149 | 149 | * |
150 | 150 | * @param string $format A canonical format name, as returned by getFormatName() or getSupportedFormats(). |
151 | 151 | * |
152 | - * @return string|null |
|
152 | + * @return string |
|
153 | 153 | */ |
154 | 154 | public function getMimeType( $format ) { |
155 | 155 | $this->initFormats(); |
@@ -68,6 +68,9 @@ |
||
68 | 68 | ] ); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param Statement $statement |
|
73 | + */ |
|
71 | 74 | private function getSerializedStatement( $statement ) { |
72 | 75 | $statementSerializer = ( new SerializerFactory( new DataValueSerializer() ) )->newStatementSerializer(); |
73 | 76 | return $statementSerializer->serialize( $statement ); |
@@ -23,6 +23,9 @@ |
||
23 | 23 | $this->setWbSetting( 'federatedPropertiesEnabled', true ); |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string|boolean $value |
|
28 | + */ |
|
26 | 29 | private function setWbSetting( string $name, $value ) { |
27 | 30 | $this->setWbSettingInGlobalIfMwIntegrationTest( $name, $value ); |
28 | 31 | $this->setWbSettingInSettings( $name, $value ); |
@@ -21,6 +21,7 @@ |
||
21 | 21 | * @param LabelsProvider $entity |
22 | 22 | * @param string $msg Message key (string) for error text |
23 | 23 | * @param array $params Array with parameters to wfMessage() |
24 | + * @param string|null $languageCode |
|
24 | 25 | * |
25 | 26 | * @suppress SecurityCheck-DoubleEscaped |
26 | 27 | */ |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param IResultWrapper|array $rows |
37 | - * @param array $languageCodes |
|
37 | + * @param string[] $languageCodes |
|
38 | 38 | * @param array $termTypes |
39 | 39 | */ |
40 | 40 | public function prefetchFederatedProperties( $rows, array $languageCodes, array $termTypes ) : void { |
@@ -182,6 +182,9 @@ |
||
182 | 182 | return $rows; |
183 | 183 | } |
184 | 184 | |
185 | + /** |
|
186 | + * @param string $titleText |
|
187 | + */ |
|
185 | 188 | private function getMockedDiffEngine( $getOldRevision, $getNewRevision, $titleText ) { |
186 | 189 | $diffEngine = $this->createMock( DifferenceEngine::class ); |
187 | 190 | $diffEngine->expects( $this->once() ) |
@@ -55,7 +55,6 @@ discard block |
||
55 | 55 | * @param string[] $termTypes |
56 | 56 | * @param string[] $languageCodes |
57 | 57 | * @param PrefetchingTermLookup|null $prefetchingTermLookup |
58 | - * @param EntityLookup|null $entityLookup |
|
59 | 58 | * @param bool $federatedPropertiesEnabled |
60 | 59 | * @return LabelPrefetchHookHandler |
61 | 60 | */ |
@@ -103,6 +102,10 @@ discard block |
||
103 | 102 | ); |
104 | 103 | } |
105 | 104 | |
105 | + /** |
|
106 | + * @param string[] $expectedTermTypes |
|
107 | + * @param string[] $expectedLanguageCodes |
|
108 | + */ |
|
106 | 109 | protected function getPrefetchTermsCallback( $expectedIds, $expectedTermTypes, $expectedLanguageCodes ) { |
107 | 110 | $prefetchTerms = function ( |
108 | 111 | array $entityIds, |
@@ -172,6 +172,9 @@ discard block |
||
172 | 172 | $this->assertContains( 'wikibase.federatedPropertiesEditRequestFailureNotice', $resourceLoaderModules ); |
173 | 173 | } |
174 | 174 | |
175 | + /** |
|
176 | + * @param PropertyId[] $expectedIds |
|
177 | + */ |
|
175 | 178 | protected function getPrefetchTermsCallback( $expectedIds ) { |
176 | 179 | $prefetchTerms = function ( |
177 | 180 | array $entityIds, |
@@ -195,6 +198,9 @@ discard block |
||
195 | 198 | return $prefetchTerms; |
196 | 199 | } |
197 | 200 | |
201 | + /** |
|
202 | + * @param FullEntityParserOutputGenerator $fullGenerator |
|
203 | + */ |
|
198 | 204 | private function newEntityParserOutputGenerator( $prefetchingTermLookup, $fullGenerator, $languageCode = 'en' ) { |
199 | 205 | return new FederatedPropertiesEntityParserOutputGenerator( |
200 | 206 | $fullGenerator, |