From a9d66a0ebe5cf73d5938c503876cdfb1efb0602f Mon Sep 17 00:00:00 2001 From: Alexandru Punga <45293316+Sanchous98@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:45:57 +0200 Subject: [PATCH] Update docblock for toThrow method parameters to satisfy the actual pest's behaviour (#2008) Signed-off-by: Alexandru Punga <45293316+Sanchous98@users.noreply.github.com> --- src/Mixins/Expectation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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