Completed
Push — master ( 0a57e3...259aca )
by
unknown
07:19 queued 10s
created
tests/phpunit/includes/FederatedProperties/ApiEntitySearchHelperTest.php 1 patch
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@  discard block
 block discarded – undo
56 56
 		return new ApiEntitySearchHelper( $api, $dataTypes );
57 57
 	}
58 58
 
59
+	/**
60
+	 * @param string $responseDataFile
61
+	 */
59 62
 	private function setupTestApi( &$params, $langCode, $responseDataFile, $statusCode = 200 ) {
60 63
 		$params = array_merge( $params, [ 'language' => $langCode, 'uselang' => $langCode, 'format' => 'json' ] );
61 64
 		$api = $this->createMock( GenericActionApiClient::class );
@@ -152,8 +155,8 @@  discard block
 block discarded – undo
152 155
 	/**
153 156
 	 * @dataProvider paramsAndExpectedResponseProvider
154 157
 	 * @param string $responseDataFile
155
-	 * @param int $expectedResultCount
156
-	 * @param array $expectedResultsEntityId
158
+	 * @param int $expectedResultsEntityIds
159
+	 * @param array $expectedResultsEntityIds
157 160
 	 * @throws ApiRequestException
158 161
 	 */
159 162
 	public function testGetRankedSearchResults( $langCode, $params, $responseDataFile, $expectedResultsEntityIds ) {
@@ -220,6 +223,9 @@  discard block
 block discarded – undo
220 223
 		}
221 224
 	}
222 225
 
226
+	/**
227
+	 * @return string
228
+	 */
223 229
 	private function getResponseDataForId( array $searchResponses, $resultId ) {
224 230
 		$searchResponses = array_filter( $searchResponses, function ( $response ) use ( $resultId ) {
225 231
 			return $response->id === $resultId;
@@ -233,8 +239,6 @@  discard block
 block discarded – undo
233 239
 	/**
234 240
 	 * @dataProvider invalidParamsAndUnexpectedResponseProvider
235 241
 	 * @param string $responseDataFile
236
-	 * @param int $expectedResultCount
237
-	 * @param array $expectedResultsEntityId
238 242
 	 */
239 243
 	public function testApiResponseStructureIsValid( $langCode, $params, $responseDataFile, $statusCode ) {
240 244
 		$api = $this->setupTestApi( $params, $langCode, $responseDataFile, $statusCode );
Please login to merge, or discard this patch.
lib/includes/Store/Sql/Terms/PrefetchingEntityTermLookupBase.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -133,6 +133,9 @@
 block discarded – undo
133 133
 		return $this->getFromBuffer( $entityId, TermTypes::TYPE_ALIAS, $languageCode ) ?? false;
134 134
 	}
135 135
 
136
+	/**
137
+	 * @param string $languageCode
138
+	 */
136 139
 	private function getFromBuffer( EntityId $entityId, $termType, $languageCode ) {
137 140
 		if ( !( $entityId instanceof Int32EntityId ) ) {
138 141
 			throw new InvalidArgumentException( "Not an Int32EntityId: " . $entityId->getSerialization() );
Please login to merge, or discard this patch.
repo/tests/phpunit/includes/HttpResponseMockerTrait.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -14,6 +14,7 @@
 block discarded – undo
14 14
 
15 15
 	/**
16 16
 	 * Some test appear to want to simulate null status codes, hence the type hint
17
+	 * @param integer $statusCode
17 18
 	 */
18 19
 	private function newMockResponse( $response, ?int $statusCode ): ResponseInterface {
19 20
 		$mockStream = $this->createMock( StreamInterface::class );
Please login to merge, or discard this patch.
lib/tests/phpunit/EntityRevisionLookupTestCase.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@
 block discarded – undo
56 56
 		];
57 57
 	}
58 58
 
59
+	/**
60
+	 * @param integer $revision
61
+	 */
59 62
 	protected function resolveLogicalRevision( $revision ) {
60 63
 		return $revision;
61 64
 	}
Please login to merge, or discard this patch.
client/includes/Changes/AffectedPagesFinder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@
 block discarded – undo
355 355
 	}
356 356
 
357 357
 	/**
358
-	 * @param iterable<PageEntityUsages> $usages
358
+	 * @param Traversable $usages
359 359
 	 * @param EntityId $entityId
360 360
 	 * @param string[] $changedAspects
361 361
 	 *
Please login to merge, or discard this patch.
client/includes/DataAccess/Scribunto/CachingFallbackBasedTermLookup.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
 	/**
140 140
 	 * @param EntityId $entityId
141 141
 	 * @param Language $language
142
-	 * @param $termType
142
+	 * @param string $termType
143 143
 	 * @return TermFallback|null
144 144
 	 */
145 145
 	private function lookupWithoutCache( EntityId $entityId, Language $language, $termType ): ?TermFallback {
Please login to merge, or discard this patch.
unit/includes/DataAccess/Scribunto/CachingFallbackBasedTermLookupTest.php 1 patch
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -110,6 +110,11 @@  discard block
 block discarded – undo
110 110
 		);
111 111
 	}
112 112
 
113
+	/**
114
+	 * @param string $term
115
+	 * @param string $requestLanguageCode
116
+	 * @param string $actualLanguageCode
117
+	 */
113 118
 	private function getTermFallback( $term, $requestLanguageCode, $actualLanguageCode = null ): ?TermFallback {
114 119
 		if ( $term === null ) {
115 120
 			return null;
@@ -264,6 +269,9 @@  discard block
 block discarded – undo
264 269
 		);
265 270
 	}
266 271
 
272
+	/**
273
+	 * @param ItemId $itemId
274
+	 */
267 275
 	private function mockCacheWithContent( string $term, $itemId ): void {
268 276
 		$termFallback = new TermFallback( 'en', $term, 'en', 'en' );
269 277
 		$this->revisionLookup->method( 'lookupLatestRevisionResolvingRedirect' )->willReturn( [ 1, $itemId ] );
@@ -284,6 +292,9 @@  discard block
 block discarded – undo
284 292
 			->willReturn( [ self::ITEM_Q1_REVISION, $itemId ] );
285 293
 	}
286 294
 
295
+	/**
296
+	 * @param ItemId $itemId
297
+	 */
287 298
 	private function mockCacheEmpty( $itemId ): void {
288 299
 		$this->mockRevisionLookup( $itemId );
289 300
 
@@ -293,6 +304,12 @@  discard block
 block discarded – undo
293 304
 			->willReturn( TermFallbackCacheFacade::NO_VALUE );
294 305
 	}
295 306
 
307
+	/**
308
+	 * @param TermFallback|null $termFallback
309
+	 * @param ItemId $targetEntityId
310
+	 * @param integer $revisionId
311
+	 * @param string $termType
312
+	 */
296 313
 	private function mockCacheSetExpectation(
297 314
 		$termFallback,
298 315
 		$targetEntityId,
@@ -307,6 +324,10 @@  discard block
 block discarded – undo
307 324
 			->with( $termFallback, $targetEntityId, $revisionId, $languageCode, $termType );
308 325
 	}
309 326
 
327
+	/**
328
+	 * @param ItemId $itemId
329
+	 * @param TermFallback|null $termFallback
330
+	 */
310 331
 	private function mockInternalLookupWithContent(
311 332
 		$itemId,
312 333
 		?TermFallback $termFallback,
Please login to merge, or discard this patch.