Skip to content
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ resolves with the results of all jobs on success.
$loop = React\EventLoop\Factory::create();
$browser = new Clue\React\Buzz\Browser($loop);

$promise = Queue:all(3, $urls, function ($url) use ($browser) {
$promise = Queue::all(3, $urls, function ($url) use ($browser) {
return $browser->get($url);
});

Expand All @@ -296,12 +296,12 @@ jobs. Using a value less than 1 will reject with an

```php
// handle up to 10 jobs concurrently
$promise = Queue:all(10, $jobs, $handler);
$promise = Queue::all(10, $jobs, $handler);
```

```php
// handle each job after another without concurrency (waterfall)
$promise = Queue:all(1, $jobs, $handler);
$promise = Queue::all(1, $jobs, $handler);
```

The `$jobs` parameter must be an array with all jobs to process. Each
Expand All @@ -326,7 +326,7 @@ $promise = Queue::all(10, $jobs, function ($url) use ($browser) {

```php
// accepts any callable, so PHP's array notation is also supported
$promise = Queue:all(10, $jobs, array($browser, 'get'));
$promise = Queue::all(10, $jobs, array($browser, 'get'));
```

> Keep in mind that returning an array of response messages means that
Expand All @@ -348,7 +348,7 @@ use Clue\React\Block;
$loop = React\EventLoop\Factory::create();
$browser = new Clue\React\Buzz\Browser($loop);

$promise = Queue:all(3, $urls, function ($url) use ($browser) {
$promise = Queue::all(3, $urls, function ($url) use ($browser) {
return $browser->get($url);
});

Expand Down
8 changes: 4 additions & 4 deletions src/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Queue implements \Countable
* $loop = React\EventLoop\Factory::create();
* $browser = new Clue\React\Buzz\Browser($loop);
*
* $promise = Queue:all(3, $urls, function ($url) use ($browser) {
* $promise = Queue::all(3, $urls, function ($url) use ($browser) {
* return $browser->get($url);
* });
*
Expand All @@ -66,12 +66,12 @@ class Queue implements \Countable
*
* ```php
* // handle up to 10 jobs concurrently
* $promise = Queue:all(10, $jobs, $handler);
* $promise = Queue::all(10, $jobs, $handler);
* ```
*
* ```php
* // handle each job after another without concurrency (waterfall)
* $promise = Queue:all(1, $jobs, $handler);
* $promise = Queue::all(1, $jobs, $handler);
* ```
*
* The `$jobs` parameter must be an array with all jobs to process. Each
Expand All @@ -96,7 +96,7 @@ class Queue implements \Countable
*
* ```php
* // accepts any callable, so PHP's array notation is also supported
* $promise = Queue:all(10, $jobs, array($browser, 'get'));
* $promise = Queue::all(10, $jobs, array($browser, 'get'));
* ```
*
* > Keep in mind that returning an array of response messages means that
Expand Down