You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$fiber = new \Fiber(function () use ($resolve, $reject, $function, $args, &$fiber): void {
196
197
try {
@@ -627,6 +628,7 @@ function coroutine(callable $function, mixed ...$args): PromiseInterface
627
628
}
628
629
629
630
$promise = null;
631
+
/** @var Deferred<T> $deferred*/
630
632
$deferred = newDeferred(function () use (&$promise) {
631
633
/** @var ?PromiseInterface<T> $promise */
632
634
if ($promiseinstanceof PromiseInterface && \method_exists($promise, 'cancel')) {
@@ -734,6 +736,7 @@ function parallel(iterable $tasks): PromiseInterface
734
736
$deferred->resolve($results);
735
737
}
736
738
739
+
/** @var PromiseInterface<array<T>> Can't define `Deferred()` above, currently not supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
737
740
return$deferred->promise();
738
741
}
739
742
@@ -789,6 +792,7 @@ function series(iterable $tasks): PromiseInterface
789
792
790
793
$next();
791
794
795
+
/** @var PromiseInterface<array<T>> Can't define `Deferred()` above, currently not supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
792
796
return$deferred->promise();
793
797
}
794
798
@@ -800,6 +804,7 @@ function series(iterable $tasks): PromiseInterface
0 commit comments