From 138801fb68cfc9c329da8a7b39d01ce7291ee4b0 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Fri, 10 May 2024 16:37:46 -0500 Subject: [PATCH] Remove mixed from variadic closure declaration mixed... was causing isues with PHPStan. --- src/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/functions.php b/src/functions.php index 05dced59..0d3bfcce 100644 --- a/src/functions.php +++ b/src/functions.php @@ -11,7 +11,7 @@ * * @template T * - * @param \Closure(mixed...):T $closure + * @param \Closure(...):T $closure * @param mixed ...$args Arguments forwarded to the closure when starting the fiber. * * @return Future @@ -131,9 +131,9 @@ function trapSignal(int|array $signals, bool $reference = true, ?Cancellation $c * * @template TReturn * - * @param \Closure(mixed...):TReturn $closure + * @param \Closure(...):TReturn $closure * - * @return \Closure(mixed...):TReturn + * @return \Closure(...):TReturn */ function weakClosure(\Closure $closure): \Closure { @@ -167,7 +167,7 @@ function weakClosure(\Closure $closure): \Closure throw new \RuntimeException('Unable to rebind closure scoped to ' . ($scope?->name ?? $that::class)); } - /** @var \Closure(mixed...):TReturn */ + /** @var \Closure(...):TReturn */ return static function (mixed ...$args) use ($reference, $closure, $useBindTo): mixed { $that = $reference->get(); if (!$that) {