From ec540cad990c21e4fd93d4b2b3d1b15c8e13ea5e Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 25 Jan 2023 08:14:16 +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 44f96ce..a8ed612 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ trigger at the earliest possible time in the future. ### parallel() -The `parallel(array> $tasks): PromiseInterface,Exception>` function can be used +The `parallel(array> $tasks): PromiseInterface>` function can be used like this: ```php @@ -203,7 +203,7 @@ React\Async\parallel([ ### series() -The `series(array> $tasks): PromiseInterface,Exception>` function can be used +The `series(array> $tasks): PromiseInterface>` function can be used like this: ```php @@ -245,7 +245,7 @@ React\Async\series([ ### waterfall() -The `waterfall(array> $tasks): PromiseInterface` function can be used +The `waterfall(array> $tasks): PromiseInterface` function can be used like this: ```php diff --git a/src/functions.php b/src/functions.php index f0334dc..7455be9 100644 --- a/src/functions.php +++ b/src/functions.php @@ -179,8 +179,8 @@ function delay($seconds) } /** - * @param array> $tasks - * @return PromiseInterface,Exception> + * @param array> $tasks + * @return PromiseInterface> */ function parallel(array $tasks) { @@ -237,8 +237,8 @@ function parallel(array $tasks) } /** - * @param array> $tasks - * @return PromiseInterface,Exception> + * @param array> $tasks + * @return PromiseInterface> */ function series(array $tasks) { @@ -277,8 +277,8 @@ function series(array $tasks) } /** - * @param array> $tasks - * @return PromiseInterface + * @param array> $tasks + * @return PromiseInterface */ function waterfall(array $tasks) {