@@ -303,6 +303,8 @@ function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeTyp
303303 /**
304304 * Asserts that a haystack contains only values of type array.
305305 *
306+ * @phpstan-assert iterable<array<mixed>> $haystack
307+ *
306308 * @param iterable<mixed> $haystack
307309 *
308310 * @throws ExpectationFailedException
@@ -321,6 +323,8 @@ function assertContainsOnlyArray(iterable $haystack, string $message = ''): void
321323 /**
322324 * Asserts that a haystack contains only values of type bool.
323325 *
326+ * @phpstan-assert iterable<bool> $haystack
327+ *
324328 * @param iterable<mixed> $haystack
325329 *
326330 * @throws ExpectationFailedException
@@ -339,6 +343,8 @@ function assertContainsOnlyBool(iterable $haystack, string $message = ''): void
339343 /**
340344 * Asserts that a haystack contains only values of type callable.
341345 *
346+ * @phpstan-assert iterable<callable> $haystack
347+ *
342348 * @param iterable<mixed> $haystack
343349 *
344350 * @throws ExpectationFailedException
@@ -357,6 +363,8 @@ function assertContainsOnlyCallable(iterable $haystack, string $message = ''): v
357363 /**
358364 * Asserts that a haystack contains only values of type float.
359365 *
366+ * @phpstan-assert iterable<float> $haystack
367+ *
360368 * @param iterable<mixed> $haystack
361369 *
362370 * @throws ExpectationFailedException
@@ -375,6 +383,8 @@ function assertContainsOnlyFloat(iterable $haystack, string $message = ''): void
375383 /**
376384 * Asserts that a haystack contains only values of type int.
377385 *
386+ * @phpstan-assert iterable<int> $haystack
387+ *
378388 * @param iterable<mixed> $haystack
379389 *
380390 * @throws ExpectationFailedException
@@ -393,6 +403,8 @@ function assertContainsOnlyInt(iterable $haystack, string $message = ''): void
393403 /**
394404 * Asserts that a haystack contains only values of type iterable.
395405 *
406+ * @phpstan-assert iterable<iterable<mixed>> $haystack
407+ *
396408 * @param iterable<mixed> $haystack
397409 *
398410 * @throws ExpectationFailedException
@@ -411,6 +423,8 @@ function assertContainsOnlyIterable(iterable $haystack, string $message = ''): v
411423 /**
412424 * Asserts that a haystack contains only values of type null.
413425 *
426+ * @phpstan-assert iterable<null> $haystack
427+ *
414428 * @param iterable<mixed> $haystack
415429 *
416430 * @throws ExpectationFailedException
@@ -429,6 +443,8 @@ function assertContainsOnlyNull(iterable $haystack, string $message = ''): void
429443 /**
430444 * Asserts that a haystack contains only values of type numeric.
431445 *
446+ * @phpstan-assert iterable<numeric> $haystack
447+ *
432448 * @param iterable<mixed> $haystack
433449 *
434450 * @throws ExpectationFailedException
@@ -447,6 +463,8 @@ function assertContainsOnlyNumeric(iterable $haystack, string $message = ''): vo
447463 /**
448464 * Asserts that a haystack contains only values of type object.
449465 *
466+ * @phpstan-assert iterable<object> $haystack
467+ *
450468 * @param iterable<mixed> $haystack
451469 *
452470 * @throws ExpectationFailedException
@@ -465,6 +483,8 @@ function assertContainsOnlyObject(iterable $haystack, string $message = ''): voi
465483 /**
466484 * Asserts that a haystack contains only values of type resource.
467485 *
486+ * @phpstan-assert iterable<resource> $haystack
487+ *
468488 * @param iterable<mixed> $haystack
469489 *
470490 * @throws ExpectationFailedException
@@ -483,6 +503,8 @@ function assertContainsOnlyResource(iterable $haystack, string $message = ''): v
483503 /**
484504 * Asserts that a haystack contains only values of type closed resource.
485505 *
506+ * @phpstan-assert iterable<resource> $haystack
507+ *
486508 * @param iterable<mixed> $haystack
487509 *
488510 * @throws ExpectationFailedException
@@ -501,6 +523,8 @@ function assertContainsOnlyClosedResource(iterable $haystack, string $message =
501523 /**
502524 * Asserts that a haystack contains only values of type scalar.
503525 *
526+ * @phpstan-assert iterable<scalar> $haystack
527+ *
504528 * @param iterable<mixed> $haystack
505529 *
506530 * @throws ExpectationFailedException
@@ -519,6 +543,8 @@ function assertContainsOnlyScalar(iterable $haystack, string $message = ''): voi
519543 /**
520544 * Asserts that a haystack contains only values of type string.
521545 *
546+ * @phpstan-assert iterable<string> $haystack
547+ *
522548 * @param iterable<mixed> $haystack
523549 *
524550 * @throws ExpectationFailedException
0 commit comments