Skip to content

Commit

Permalink
Remove mixed from variadic closure declaration
Browse files Browse the repository at this point in the history
mixed... was causing isues with PHPStan.
  • Loading branch information
trowski committed May 10, 2024
1 parent ff63f10 commit 138801f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 138801f

Please sign in to comment.