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) {
385
387
foreach ($pendingas$promise) {
386
388
if ($promiseinstanceof PromiseInterface && \method_exists($promise, 'cancel')) {
@@ -430,6 +432,7 @@ function parallel(iterable $tasks): PromiseInterface
430
432
$deferred->resolve($results);
431
433
}
432
434
435
+
/** @var PromiseInterface<array<T>> Remove once defining `Deferred()` above is supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
433
436
return$deferred->promise();
434
437
}
435
438
@@ -441,6 +444,7 @@ function parallel(iterable $tasks): PromiseInterface
441
444
functionseries(iterable$tasks): PromiseInterface
442
445
{
443
446
$pending = null;
447
+
/** @var Deferred<array<T>> $deferred */
444
448
$deferred = newDeferred(function () use (&$pending) {
445
449
/** @var ?PromiseInterface<T> $pending */
446
450
if ($pendinginstanceof PromiseInterface && \method_exists($pending, 'cancel')) {
@@ -485,6 +489,7 @@ function series(iterable $tasks): PromiseInterface
485
489
486
490
$next();
487
491
492
+
/** @var PromiseInterface<array<T>> Remove once defining `Deferred()` above is supported by PHPStan, see https://github.com/phpstan/phpstan/issues/11032 */
488
493
return$deferred->promise();
489
494
}
490
495
@@ -496,6 +501,7 @@ function series(iterable $tasks): PromiseInterface
0 commit comments