From 8028f4c581d4333f28c241187ae37ba420c44e2a Mon Sep 17 00:00:00 2001 From: Pablo Largo Mohedano Date: Mon, 22 Apr 2024 02:38:49 +0200 Subject: [PATCH] `callable(mixed)` to `callable(TIn)` in `__construct()` `$handler` parameter This allows to create a new instance of `Queue` with a typed input parameter on the `$handler` callable --- src/Queue.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Queue.php b/src/Queue.php index 2287514..52ee135 100644 --- a/src/Queue.php +++ b/src/Queue.php @@ -318,9 +318,10 @@ public static function any($concurrency, array $jobs, $handler) * $q = new Queue(10, null, array($browser, 'get')); * ``` * + * @template TIn * @param int $concurrency concurrency soft limit * @param int|null $limit queue hard limit or NULL=unlimited - * @param callable(mixed):PromiseInterface $handler + * @param callable(TIn):PromiseInterface $handler * @throws \InvalidArgumentException */ public function __construct($concurrency, $limit, $handler)