Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Template params can only have one argument #73

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ Loop::addTimer(2.0, function () use ($promise) {

### parallel()

The `parallel(iterable<callable():PromiseInterface<mixed,Exception>> $tasks): PromiseInterface<array<mixed>,Exception>` function can be used
The `parallel(iterable<callable():PromiseInterface<mixed>> $tasks): PromiseInterface<array<mixed>>` function can be used
like this:

```php
Expand Down Expand Up @@ -540,7 +540,7 @@ React\Async\parallel([

### series()

The `series(iterable<callable():PromiseInterface<mixed,Exception>> $tasks): PromiseInterface<array<mixed>,Exception>` function can be used
The `series(iterable<callable():PromiseInterface<mixed>> $tasks): PromiseInterface<array<mixed>>` function can be used
like this:

```php
Expand Down Expand Up @@ -582,7 +582,7 @@ React\Async\series([

### waterfall()

The `waterfall(iterable<callable(mixed=):PromiseInterface<mixed,Exception>> $tasks): PromiseInterface<mixed,Exception>` function can be used
The `waterfall(iterable<callable(mixed=):PromiseInterface<mixed>> $tasks): PromiseInterface<mixed>` function can be used
like this:

```php
Expand Down
12 changes: 6 additions & 6 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,8 @@ function coroutine(callable $function, mixed ...$args): PromiseInterface
}

/**
* @param iterable<callable():PromiseInterface<mixed,Exception>> $tasks
* @return PromiseInterface<array<mixed>,Exception>
* @param iterable<callable():PromiseInterface<mixed>> $tasks
* @return PromiseInterface<array<mixed>>
*/
function parallel(iterable $tasks): PromiseInterface
{
Expand Down Expand Up @@ -711,8 +711,8 @@ function parallel(iterable $tasks): PromiseInterface
}

/**
* @param iterable<callable():PromiseInterface<mixed,Exception>> $tasks
* @return PromiseInterface<array<mixed>,Exception>
* @param iterable<callable():PromiseInterface<mixed>> $tasks
* @return PromiseInterface<array<mixed>>
*/
function series(iterable $tasks): PromiseInterface
{
Expand Down Expand Up @@ -762,8 +762,8 @@ function series(iterable $tasks): PromiseInterface
}

/**
* @param iterable<callable(mixed=):PromiseInterface<mixed,Exception>> $tasks
* @return PromiseInterface<mixed,Exception>
* @param iterable<callable(mixed=):PromiseInterface<mixed>> $tasks
* @return PromiseInterface<mixed>
*/
function waterfall(iterable $tasks): PromiseInterface
{
Expand Down