Skip to content

Commit

Permalink
Template params can only have one argument
Browse files Browse the repository at this point in the history
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: reactphp/promise#223
  • Loading branch information
WyriHaximus committed Jan 24, 2023
1 parent 2de95d5 commit 07653f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ See also the wiki for possible [cache implementations](https://github.com/reactp

### resolve()

The `resolve(string $domain): PromiseInterface<string,Exception>` method can be used to
The `resolve(string $domain): PromiseInterface<string>` method can be used to
resolve the given $domain name to a single IPv4 address (type `A` query).

```php
Expand Down Expand Up @@ -151,7 +151,7 @@ $promise->cancel();

### resolveAll()

The `resolveAll(string $host, int $type): PromiseInterface<array,Exception>` method can be used to
The `resolveAll(string $host, int $type): PromiseInterface<array>` method can be used to
resolve all record values for the given $domain name and query $type.

```php
Expand Down
2 changes: 1 addition & 1 deletion src/Query/ExecutorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/Resolver/ResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface ResolverInterface
* ```
*
* @param string $domain
* @return \React\Promise\PromiseInterface<string,\Exception>
* @return \React\Promise\PromiseInterface<string>
* resolves with a single IP address on success or rejects with an Exception on error.
*/
public function resolve($domain);
Expand Down Expand Up @@ -87,7 +87,7 @@ public function resolve($domain);
* ```
*
* @param string $domain
* @return \React\Promise\PromiseInterface<array,\Exception>
* @return \React\Promise\PromiseInterface<array>
* Resolves with all record values on success or rejects with an Exception on error.
*/
public function resolveAll($domain, $type);
Expand Down

0 comments on commit 07653f3

Please sign in to comment.