diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index ee2414e9..5bb208cc 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -806,7 +806,9 @@ final class Expectation } /** - * @param (Closure(Throwable): mixed)|string $exception + * @template T of Throwable + * + * @param (Closure(T): mixed)|string|T $exception * @return self */ public function toThrow(callable|string|Throwable $exception, ?string $exceptionMessage = null, string $message = ''): self