@@ -196,9 +196,9 @@ function ($error) use (&$exception, &$rejected, &$wait, $loop) {
196196 * value, it will still start a timer and will thus trigger at the earliest
197197 * possible time in the future.
198198 *
199- * @paramarray $promises
200- * @param ?LoopInterface $loop
201- * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
199+ * @paramPromiseInterface[] $promises
200+ * @param ?LoopInterface $loop
201+ * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
202202 * @return mixed returns whatever the first promise resolves to
203203 * @throws Exception if ALL promises are rejected
204204 * @throws TimeoutException if the $timeout is given and triggers
@@ -287,9 +287,9 @@ function awaitAny(array $promises, LoopInterface $loop = null, $timeout = null)
287287 * value, it will still start a timer and will thus trigger at the earliest
288288 * possible time in the future.
289289 *
290- * @paramarray $promises
291- * @param ?LoopInterface $loop
292- * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
290+ * @paramPromiseInterface[] $promises
291+ * @param ?LoopInterface $loop
292+ * @param ?float $timeout [deprecated] (optional) maximum timeout in seconds or null=wait forever
293293 * @return array returns an array with whatever each promise resolves to
294294 * @throws Exception when ANY promise is rejected
295295 * @throws TimeoutException if the $timeout is given and triggers
@@ -322,7 +322,7 @@ function awaitAll(array $promises, LoopInterface $loop = null, $timeout = null)
322322function _cancelAllPromises (array $ promises )
323323{
324324foreach ($ promisesas $ promise ) {
325- if ($ promiseinstanceof CancellablePromiseInterface ||(! \interface_exists ('React\Promise\CancellablePromiseInterface ' ) && \method_exists ( $ promise , ' cancel ' ))) {
325+ if ($ promiseinstanceof PromiseInterface && ( $ promise instanceof CancellablePromiseInterface ||! \interface_exists ('React\Promise\CancellablePromiseInterface ' ))) {
326326$ promise ->cancel ();
327327 }
328328 }