From 07653f3d725571202b2376930c181592b59cd171 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sat, 21 Jan 2023 14:51:03 +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 | 4 ++-- src/Query/ExecutorInterface.php | 2 +- src/Resolver/ResolverInterface.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aec612e5..0cc3bfe9 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ See also the wiki for possible [cache implementations](https://github.com/reactp ### resolve() -The `resolve(string $domain): PromiseInterface` method can be used to +The `resolve(string $domain): PromiseInterface` method can be used to resolve the given $domain name to a single IPv4 address (type `A` query). ```php @@ -151,7 +151,7 @@ $promise->cancel(); ### resolveAll() -The `resolveAll(string $host, int $type): PromiseInterface` method can be used to +The `resolveAll(string $host, int $type): PromiseInterface` method can be used to resolve all record values for the given $domain name and query $type. ```php diff --git a/src/Query/ExecutorInterface.php b/src/Query/ExecutorInterface.php index b356dc62..0bc3945f 100644 --- a/src/Query/ExecutorInterface.php +++ b/src/Query/ExecutorInterface.php @@ -36,7 +36,7 @@ interface ExecutorInterface * ``` * * @param Query $query - * @return \React\Promise\PromiseInterface<\React\Dns\Model\Message,\Exception> + * @return \React\Promise\PromiseInterface<\React\Dns\Model\Message> * resolves with response message on success or rejects with an Exception on error */ public function query(Query $query); diff --git a/src/Resolver/ResolverInterface.php b/src/Resolver/ResolverInterface.php index fe937dc7..555a1cb1 100644 --- a/src/Resolver/ResolverInterface.php +++ b/src/Resolver/ResolverInterface.php @@ -39,7 +39,7 @@ interface ResolverInterface * ``` * * @param string $domain - * @return \React\Promise\PromiseInterface + * @return \React\Promise\PromiseInterface * resolves with a single IP address on success or rejects with an Exception on error. */ public function resolve($domain); @@ -87,7 +87,7 @@ public function resolve($domain); * ``` * * @param string $domain - * @return \React\Promise\PromiseInterface + * @return \React\Promise\PromiseInterface * Resolves with all record values on success or rejects with an Exception on error. */ public function resolveAll($domain, $type);