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
$deferred = newDeferred(function () use (&$pending) {
689
692
foreach ($pendingas$promise) {
690
693
if ($promiseinstanceof PromiseInterface && \method_exists($promise, 'cancel')) {
@@ -734,6 +737,7 @@ function parallel(iterable $tasks): PromiseInterface
734
737
$deferred->resolve($results);
735
738
}
736
739
740
+
/** @var PromiseInterface<array<T>> Remove once defining `Deferred()` above is supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
737
741
return$deferred->promise();
738
742
}
739
743
@@ -745,6 +749,7 @@ function parallel(iterable $tasks): PromiseInterface
745
749
functionseries(iterable$tasks): PromiseInterface
746
750
{
747
751
$pending = null;
752
+
/** @var Deferred<array<T>> $deferred */
748
753
$deferred = newDeferred(function () use (&$pending) {
749
754
/** @var ?PromiseInterface<T> $pending */
750
755
if ($pendinginstanceof PromiseInterface && \method_exists($pending, 'cancel')) {
@@ -789,6 +794,7 @@ function series(iterable $tasks): PromiseInterface
789
794
790
795
$next();
791
796
797
+
/** @var PromiseInterface<array<T>> Remove once defining `Deferred()` above is supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
792
798
return$deferred->promise();
793
799
}
794
800
@@ -800,6 +806,7 @@ function series(iterable $tasks): PromiseInterface
0 commit comments