diff options
Diffstat (limited to 'vendor/guzzlehttp/promises/src/Each.php')
| -rw-r--r-- | vendor/guzzlehttp/promises/src/Each.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php index 1a7aa0fb6..dd72c8310 100644 --- a/vendor/guzzlehttp/promises/src/Each.php +++ b/vendor/guzzlehttp/promises/src/Each.php @@ -19,14 +19,12 @@ final class Each * index, and the aggregate promise. The callback can invoke any necessary * side effects and choose to resolve or reject the aggregate if needed. * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected + * @param mixed $iterable Iterator or array to iterate over. */ public static function of( $iterable, - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { return (new EachPromise($iterable, [ 'fulfilled' => $onFulfilled, @@ -44,14 +42,12 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected */ public static function ofLimit( $iterable, $concurrency, - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { return (new EachPromise($iterable, [ 'fulfilled' => $onFulfilled, @@ -67,12 +63,11 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency - * @param callable $onFulfilled */ public static function ofLimitAll( $iterable, $concurrency, - callable $onFulfilled = null + ?callable $onFulfilled = null ): PromiseInterface { return self::ofLimit( $iterable, |