From 55b44c0e593306c80a9b655f57c9518ed8a91511 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 25 Jan 2023 08:09:18 +0100 Subject: [PATCH] Template params can only have one argument The fact that a promise can also be rejected with a Throwable and/or Exception is implied and there is no need to also define that here. Refs: https://github.com/reactphp/promise/pull/223 --- README.md | 6 +++--- src/functions.php | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ebf6543..4380c86 100644 --- a/README.md +++ b/README.md @@ -498,7 +498,7 @@ Loop::addTimer(2.0, function () use ($promise) { ### parallel() -The `parallel(iterable> $tasks): PromiseInterface,Exception>` function can be used +The `parallel(iterable> $tasks): PromiseInterface>` function can be used like this: ```php @@ -540,7 +540,7 @@ React\Async\parallel([ ### series() -The `series(iterable> $tasks): PromiseInterface,Exception>` function can be used +The `series(iterable> $tasks): PromiseInterface>` function can be used like this: ```php @@ -582,7 +582,7 @@ React\Async\series([ ### waterfall() -The `waterfall(iterable> $tasks): PromiseInterface` function can be used +The `waterfall(iterable> $tasks): PromiseInterface` function can be used like this: ```php diff --git a/src/functions.php b/src/functions.php index e4101df..797911b 100644 --- a/src/functions.php +++ b/src/functions.php @@ -652,8 +652,8 @@ function coroutine(callable $function, mixed ...$args): PromiseInterface } /** - * @param iterable> $tasks - * @return PromiseInterface,Exception> + * @param iterable> $tasks + * @return PromiseInterface> */ function parallel(iterable $tasks): PromiseInterface { @@ -711,8 +711,8 @@ function parallel(iterable $tasks): PromiseInterface } /** - * @param iterable> $tasks - * @return PromiseInterface,Exception> + * @param iterable> $tasks + * @return PromiseInterface> */ function series(iterable $tasks): PromiseInterface { @@ -762,8 +762,8 @@ function series(iterable $tasks): PromiseInterface } /** - * @param iterable> $tasks - * @return PromiseInterface + * @param iterable> $tasks + * @return PromiseInterface */ function waterfall(iterable $tasks): PromiseInterface {