@@ -275,16 +275,19 @@ function assertNotContainsEquals(mixed $needle, iterable $haystack, string $mess
275
275
/**
276
276
* Asserts that a haystack contains only values of a given type.
277
277
*
278
- * @param iterable<mixed> $haystack
278
+ * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type
279
+ * @param iterable<mixed> $haystack
279
280
*
280
281
* @throws Exception
281
282
* @throws ExpectationFailedException
282
283
*
284
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056
285
+ *
283
286
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
284
287
*
285
288
* @see Assert::assertContainsOnly
286
289
*/
287
- function assertContainsOnly (NativeType $ type , iterable $ haystack , string $ message = '' ): void
290
+ function assertContainsOnly (string $ type , iterable $ haystack, ? bool $ isNativeType = null , string $ message = '' ): void
288
291
{
289
292
Assert::assertContainsOnly (...func_get_args ());
290
293
}
@@ -530,16 +533,19 @@ function assertContainsOnlyInstancesOf(string $className, iterable $haystack, st
530
533
/**
531
534
* Asserts that a haystack does not contain only values of a given type.
532
535
*
533
- * @param iterable<mixed> $haystack
536
+ * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type
537
+ * @param iterable<mixed> $haystack
534
538
*
535
539
* @throws Exception
536
540
* @throws ExpectationFailedException
537
541
*
542
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056
543
+ *
538
544
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
539
545
*
540
546
* @see Assert::assertNotContainsOnly
541
547
*/
542
- function assertNotContainsOnly (NativeType $ type , iterable $ haystack , string $ message = '' ): void
548
+ function assertNotContainsOnly (string $ type , iterable $ haystack, ? bool $ isNativeType = null , string $ message = '' ): void
543
549
{
544
550
Assert::assertNotContainsOnly (...func_get_args ());
545
551
}
0 commit comments