Skip to content

Commit

Permalink
Merge pull request #64 from WyriHaximus-secret-labs/1.x-template-para…
Browse files Browse the repository at this point in the history
…ms-can-only-have-one-argument-readme

Template params can only have one argument - README
  • Loading branch information
clue authored Jan 25, 2023
2 parents b3fafc4 + 647aea4 commit 3dbc371
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Timer\timeout(…);

### timeout()

The `timeout(PromiseInterface<mixed, Throwable|mixed> $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed, TimeoutException|Throwable|mixed>` function can be used to
The `timeout(PromiseInterface<mixed> $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed>` function can be used to
cancel operations that take *too long*.

You need to pass in an input `$promise` that represents a pending operation
Expand Down Expand Up @@ -171,7 +171,7 @@ For more details on the promise primitives, please refer to the

### sleep()

The `sleep(float $time, ?LoopInterface $loop = null): PromiseInterface<void, RuntimeException>` function can be used to
The `sleep(float $time, ?LoopInterface $loop = null): PromiseInterface<void>` function can be used to
create a new promise that resolves in `$time` seconds.

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

> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float, RuntimeException>` function can be used to
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float>` function can be used to
create a new promise that resolves in `$time` seconds with the `$time` as the fulfillment value.

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

> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.
The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void, TimeoutException|RuntimeException>` function can be used to
The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void>` function can be used to
create a new promise which rejects in `$time` seconds with a `TimeoutException`.

```php
Expand Down

0 comments on commit 3dbc371

Please sign in to comment.