$results[$idx] =
$value;
if (count($results) >=
$count) { $p->
resolve(null
);
} },
function D
$reason) use (&
$rejections): void
{ $rejections[] =
$reason;
} )->
then( function D
) use (&
$results, &
$rejections,
$count) { if (count($results) !==
$count) { throw new AggregateException( 'Not enough promises to fulfill count',
$rejections );
} ksort($results);
return array_values($results);
} );
}