← All changes
|
includes/sdk/google/guzzlehttp/promises/src/Each.php
+5
-5
1.2.7
→
1.4.2
View file →
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | declare (strict_types=1); |
| 4 | -namespace Dudlewebs\WPMCS\GuzzleHttp\Promise; | |
| 4 | +namespace Dudlewebs\WPMCS\GCP\GuzzleHttp\Promise; | |
| 5 | 5 | |
| 6 | 6 | final class Each |
| 7 | 7 | { |
| 8 | 8 | /** |
| @@ -19,9 +19,9 @@ | ||
| 19 | 19 | * side effects and choose to resolve or reject the aggregate if needed. |
| 20 | 20 | * |
| 21 | 21 | * @param mixed $iterable Iterator or array to iterate over. |
| 22 | 22 | */ |
| 23 | - public static function of($iterable, ?callable $onFulfilled = null, ?callable $onRejected = null): PromiseInterface | |
| 23 | + public static function of($iterable, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface | |
| 24 | 24 | { |
| 25 | 25 | return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected]))->promise(); |
| 26 | 26 | } |
| 27 | 27 | /** |
| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | * |
| 35 | 35 | * @param mixed $iterable |
| 36 | 36 | * @param int|callable $concurrency |
| 37 | 37 | */ |
| 38 | - public static function ofLimit($iterable, $concurrency, ?callable $onFulfilled = null, ?callable $onRejected = null): PromiseInterface | |
| 38 | + public static function ofLimit($iterable, $concurrency, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface | |
| 39 | 39 | { |
| 40 | 40 | return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency]))->promise(); |
| 41 | 41 | } |
| 42 | 42 | /** |
| @@ -46,11 +46,11 @@ | ||
| 46 | 46 | * |
| 47 | 47 | * @param mixed $iterable |
| 48 | 48 | * @param int|callable $concurrency |
| 49 | 49 | */ |
| 50 | - public static function ofLimitAll($iterable, $concurrency, ?callable $onFulfilled = null): PromiseInterface | |
| 50 | + public static function ofLimitAll($iterable, $concurrency, ?callable $onFulfilled = null) : PromiseInterface | |
| 51 | 51 | { |
| 52 | - return self::ofLimit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate): void { | |
| 52 | + return self::ofLimit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate) : void { | |
| 53 | 53 | $aggregate->reject($reason); |
| 54 | 54 | }); |
| 55 | 55 | } |
| 56 | 56 | } |