@@ -196,9 +196,9 @@ function ($error) use (&$exception, &$rejected, &$wait, $loop) {
196
196
* value, it will still start a timer and will thus trigger at the earliest
197
197
* possible time in the future.
198
198
*
199
- * @param array $promises
200
- * @param ?LoopInterface $loop
201
- * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
199
+ * @param PromiseInterface[] $promises
200
+ * @param ?LoopInterface $loop
201
+ * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
202
202
* @return mixed returns whatever the first promise resolves to
203
203
* @throws Exception if ALL promises are rejected
204
204
* @throws TimeoutException if the $timeout is given and triggers
@@ -287,9 +287,9 @@ function awaitAny(array $promises, LoopInterface $loop = null, $timeout = null)
287
287
* value, it will still start a timer and will thus trigger at the earliest
288
288
* possible time in the future.
289
289
*
290
- * @param array $promises
291
- * @param ?LoopInterface $loop
292
- * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
290
+ * @param PromiseInterface[] $promises
291
+ * @param ?LoopInterface $loop
292
+ * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
293
293
* @return array returns an array with whatever each promise resolves to
294
294
* @throws Exception when ANY promise is rejected
295
295
* @throws TimeoutException if the $timeout is given and triggers
@@ -322,7 +322,7 @@ function awaitAll(array $promises, LoopInterface $loop = null, $timeout = null)
322
322
function _cancelAllPromises (array $ promises )
323
323
{
324
324
foreach ($ promises as $ promise ) {
325
- if ($ promise instanceof CancellablePromiseInterface || (! \interface_exists ('React\Promise\CancellablePromiseInterface ' ) && \method_exists ( $ promise , ' cancel ' ))) {
325
+ if ($ promise instanceof PromiseInterface && ( $ promise instanceof CancellablePromiseInterface || ! \interface_exists ('React\Promise\CancellablePromiseInterface ' ))) {
326
326
$ promise ->cancel ();
327
327
}
328
328
}
0 commit comments