From 22df61663742bb0c406d220fda573b7747911a6f Mon Sep 17 00:00:00 2001 From: magdev Date: Fri, 13 Sep 2024 02:42:52 +0200 Subject: [PATCH] scope api and method to closure --- src/Client/RedmineClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client/RedmineClient.php b/src/Client/RedmineClient.php index 8f2c527..401b742 100644 --- a/src/Client/RedmineClient.php +++ b/src/Client/RedmineClient.php @@ -32,7 +32,7 @@ final class RedmineClient { $cacheKey = sprintf('%s_%s_%s', $api, $method, sha1(serialize($arguments))); - return $this->cache->get($cacheKey, function (ItemInterface $item): string { + return $this->cache->get($cacheKey, function (ItemInterface $item) use ($api, $method): array { $item->expiresAfter(3600); $item->tag([$api, $method]);