From 41cfb831cbacc0b936817820dcd462cea10b2268 Mon Sep 17 00:00:00 2001 From: dmitry krokhin Date: Fri, 3 May 2024 17:07:07 +0300 Subject: [PATCH] optional cache constructor argument --- src/Mapper.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mapper.php b/src/Mapper.php index 0a8f6b0..9c66a81 100644 --- a/src/Mapper.php +++ b/src/Mapper.php @@ -21,10 +21,11 @@ class Mapper extends Api public readonly Client $client; public readonly Converter $converter; public readonly Middleware $middleware; - public ?CacheItemPoolInterface $cache = null; - public function __construct(Client $client) - { + public function __construct( + Client $client, + public ?CacheItemPoolInterface $cache = null, + ) { $this->middleware = new Middleware($this); $this->client = $client->withMiddleware($this->middleware); $this->converter = new Converter();