diff --git a/src/Framework/Assert.php b/src/Framework/Assert.php index 6ed4b6dfd69..42889f79e63 100644 --- a/src/Framework/Assert.php +++ b/src/Framework/Assert.php @@ -527,9 +527,10 @@ final public static function assertContainsOnlyString(iterable $haystack, string /** * Asserts that a haystack contains only instances of a specified interface or class name. - * - * @param class-string $className - * @param iterable $haystack + * @template T + * @phpstan-assert iterable $haystack + * @param class-string $className + * @param iterable $haystack * * @throws Exception * @throws ExpectationFailedException diff --git a/src/Framework/Assert/Functions.php b/src/Framework/Assert/Functions.php index cfe2557e300..9207d3ff2b9 100644 --- a/src/Framework/Assert/Functions.php +++ b/src/Framework/Assert/Functions.php @@ -537,8 +537,10 @@ function assertContainsOnlyString(iterable $haystack, string $message = ''): voi /** * Asserts that a haystack contains only instances of a specified interface or class name. * - * @param class-string $className - * @param iterable $haystack + * @template T + * @phpstan-assert iterable $haystack + * @param class-string $className + * @param iterable $haystack * * @throws Exception * @throws ExpectationFailedException