X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=lib%2FAPI%2FCall%2FCache%2FService%2FItemPool.php;h=fb488ad4006f3bfd470b6b12579c16a7602c04ce;hp=264cfbd173ea4414eaeeb36324333ab38a0f3c29;hb=HEAD;hpb=2121556150be871684b5046af7cf250b8219128d diff --git a/lib/API/Call/Cache/Service/ItemPool.php b/lib/API/Call/Cache/Service/ItemPool.php index 264cfbd..fb488ad 100644 --- a/lib/API/Call/Cache/Service/ItemPool.php +++ b/lib/API/Call/Cache/Service/ItemPool.php @@ -8,18 +8,9 @@ use Psr\Cache\CacheItemPoolInterface; use seekat\API\Call\Cache\Service; final class ItemPool implements Service { - /** - * @var CacheItemPoolInterface - */ - private $cache; - - /** - * @var CacheItemInterface - */ - private $item; + private ?CacheItemInterface $item; - public function __construct(CacheItemPoolInterface $cache) { - $this->cache = $cache; + public function __construct(private readonly CacheItemPoolInterface $cache) { } /** @@ -46,11 +37,11 @@ final class ItemPool implements Service { * @param string $key * @throws \Psr\Cache\InvalidArgumentException */ - public function del(string $key) { + public function del(string $key) : void { $this->cache->deleteItem($key); } - public function clear() { + public function clear() : void { $this->cache->clear(); } }