Skip to content

Commit 138801f

Browse files
committed
Remove mixed from variadic closure declaration
mixed... was causing isues with PHPStan.
1 parent ff63f10 commit 138801f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @template T
1313
*
14-
* @param \Closure(mixed...):T $closure
14+
* @param \Closure(...):T $closure
1515
* @param mixed ...$args Arguments forwarded to the closure when starting the fiber.
1616
*
1717
* @return Future<T>
@@ -131,9 +131,9 @@ function trapSignal(int|array $signals, bool $reference = true, ?Cancellation $c
131131
*
132132
* @template TReturn
133133
*
134-
* @param \Closure(mixed...):TReturn $closure
134+
* @param \Closure(...):TReturn $closure
135135
*
136-
* @return \Closure(mixed...):TReturn
136+
* @return \Closure(...):TReturn
137137
*/
138138
function weakClosure(\Closure $closure): \Closure
139139
{
@@ -167,7 +167,7 @@ function weakClosure(\Closure $closure): \Closure
167167
throw new \RuntimeException('Unable to rebind closure scoped to ' . ($scope?->name ?? $that::class));
168168
}
169169

170-
/** @var \Closure(mixed...):TReturn */
170+
/** @var \Closure(...):TReturn */
171171
return static function (mixed ...$args) use ($reference, $closure, $useBindTo): mixed {
172172
$that = $reference->get();
173173
if (!$that) {

0 commit comments

Comments
 (0)