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 21, 2023
1 parent 790ce75 commit a584f92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@
* For more details on the promise primitives, please refer to the
* [Promise documentation](https://github.com/reactphp/promise#functions).
*
* @param PromiseInterface<mixed, \Throwable|mixed> $promise
* @param PromiseInterface<mixed> $promise
* @param float $time
* @param ?LoopInterface $loop
* @return PromiseInterface<mixed, TimeoutException|\Throwable|mixed>
* @return PromiseInterface<mixed>
*/
function timeout(PromiseInterface $promise, $time, LoopInterface $loop = null)
{
Expand Down Expand Up @@ -219,7 +219,7 @@ function timeout(PromiseInterface $promise, $time, LoopInterface $loop = null)
*
* @param float $time
* @param ?LoopInterface $loop
* @return PromiseInterface<void, \RuntimeException>
* @return PromiseInterface<void>
*/
function sleep($time, LoopInterface $loop = null)
{
Expand Down Expand Up @@ -275,7 +275,7 @@ function sleep($time, LoopInterface $loop = null)
*
* @param float $time
* @param ?LoopInterface $loop
* @return PromiseInterface<float, \RuntimeException>
* @return PromiseInterface<float>
* @deprecated 1.8.0 See `sleep()` instead
* @see sleep()
*/
Expand Down Expand Up @@ -318,7 +318,7 @@ function resolve($time, LoopInterface $loop = null)
*
* @param float $time
* @param LoopInterface $loop
* @return PromiseInterface<void, TimeoutException|\RuntimeException>
* @return PromiseInterface<void>
* @deprecated 1.8.0 See `sleep()` instead
* @see sleep()
*/
Expand Down

0 comments on commit a584f92

Please sign in to comment.