@@ -303,6 +303,8 @@ function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeTyp
303
303
/**
304
304
* Asserts that a haystack contains only values of type array.
305
305
*
306
+ * @phpstan-assert iterable<array<mixed>> $haystack
307
+ *
306
308
* @param iterable<mixed> $haystack
307
309
*
308
310
* @throws ExpectationFailedException
@@ -321,6 +323,8 @@ function assertContainsOnlyArray(iterable $haystack, string $message = ''): void
321
323
/**
322
324
* Asserts that a haystack contains only values of type bool.
323
325
*
326
+ * @phpstan-assert iterable<bool> $haystack
327
+ *
324
328
* @param iterable<mixed> $haystack
325
329
*
326
330
* @throws ExpectationFailedException
@@ -339,6 +343,8 @@ function assertContainsOnlyBool(iterable $haystack, string $message = ''): void
339
343
/**
340
344
* Asserts that a haystack contains only values of type callable.
341
345
*
346
+ * @phpstan-assert iterable<callable> $haystack
347
+ *
342
348
* @param iterable<mixed> $haystack
343
349
*
344
350
* @throws ExpectationFailedException
@@ -357,6 +363,8 @@ function assertContainsOnlyCallable(iterable $haystack, string $message = ''): v
357
363
/**
358
364
* Asserts that a haystack contains only values of type float.
359
365
*
366
+ * @phpstan-assert iterable<float> $haystack
367
+ *
360
368
* @param iterable<mixed> $haystack
361
369
*
362
370
* @throws ExpectationFailedException
@@ -375,6 +383,8 @@ function assertContainsOnlyFloat(iterable $haystack, string $message = ''): void
375
383
/**
376
384
* Asserts that a haystack contains only values of type int.
377
385
*
386
+ * @phpstan-assert iterable<int> $haystack
387
+ *
378
388
* @param iterable<mixed> $haystack
379
389
*
380
390
* @throws ExpectationFailedException
@@ -393,6 +403,8 @@ function assertContainsOnlyInt(iterable $haystack, string $message = ''): void
393
403
/**
394
404
* Asserts that a haystack contains only values of type iterable.
395
405
*
406
+ * @phpstan-assert iterable<iterable<mixed>> $haystack
407
+ *
396
408
* @param iterable<mixed> $haystack
397
409
*
398
410
* @throws ExpectationFailedException
@@ -411,6 +423,8 @@ function assertContainsOnlyIterable(iterable $haystack, string $message = ''): v
411
423
/**
412
424
* Asserts that a haystack contains only values of type null.
413
425
*
426
+ * @phpstan-assert iterable<null> $haystack
427
+ *
414
428
* @param iterable<mixed> $haystack
415
429
*
416
430
* @throws ExpectationFailedException
@@ -429,6 +443,8 @@ function assertContainsOnlyNull(iterable $haystack, string $message = ''): void
429
443
/**
430
444
* Asserts that a haystack contains only values of type numeric.
431
445
*
446
+ * @phpstan-assert iterable<numeric> $haystack
447
+ *
432
448
* @param iterable<mixed> $haystack
433
449
*
434
450
* @throws ExpectationFailedException
@@ -447,6 +463,8 @@ function assertContainsOnlyNumeric(iterable $haystack, string $message = ''): vo
447
463
/**
448
464
* Asserts that a haystack contains only values of type object.
449
465
*
466
+ * @phpstan-assert iterable<object> $haystack
467
+ *
450
468
* @param iterable<mixed> $haystack
451
469
*
452
470
* @throws ExpectationFailedException
@@ -465,6 +483,8 @@ function assertContainsOnlyObject(iterable $haystack, string $message = ''): voi
465
483
/**
466
484
* Asserts that a haystack contains only values of type resource.
467
485
*
486
+ * @phpstan-assert iterable<resource> $haystack
487
+ *
468
488
* @param iterable<mixed> $haystack
469
489
*
470
490
* @throws ExpectationFailedException
@@ -483,6 +503,8 @@ function assertContainsOnlyResource(iterable $haystack, string $message = ''): v
483
503
/**
484
504
* Asserts that a haystack contains only values of type closed resource.
485
505
*
506
+ * @phpstan-assert iterable<resource> $haystack
507
+ *
486
508
* @param iterable<mixed> $haystack
487
509
*
488
510
* @throws ExpectationFailedException
@@ -501,6 +523,8 @@ function assertContainsOnlyClosedResource(iterable $haystack, string $message =
501
523
/**
502
524
* Asserts that a haystack contains only values of type scalar.
503
525
*
526
+ * @phpstan-assert iterable<scalar> $haystack
527
+ *
504
528
* @param iterable<mixed> $haystack
505
529
*
506
530
* @throws ExpectationFailedException
@@ -519,6 +543,8 @@ function assertContainsOnlyScalar(iterable $haystack, string $message = ''): voi
519
543
/**
520
544
* Asserts that a haystack contains only values of type string.
521
545
*
546
+ * @phpstan-assert iterable<string> $haystack
547
+ *
522
548
* @param iterable<mixed> $haystack
523
549
*
524
550
* @throws ExpectationFailedException
0 commit comments