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