X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=lib%2FAPI%2FCall%2FCache%2FService%2FSimple.php;fp=lib%2FAPI%2FCall%2FCache%2FService%2FSimple.php;h=45bd5fe0bc192d6aafbb457393ec7b4906f807cc;hp=4358f1f2f17f37233a6df9a612aa206e1f728227;hb=654d736df2c46ec2520f73e9089d06a44f2b9c50;hpb=2121556150be871684b5046af7cf250b8219128d;ds=sidebyside diff --git a/lib/API/Call/Cache/Service/Simple.php b/lib/API/Call/Cache/Service/Simple.php index 4358f1f..45bd5fe 100644 --- a/lib/API/Call/Cache/Service/Simple.php +++ b/lib/API/Call/Cache/Service/Simple.php @@ -7,13 +7,7 @@ use Psr\SimpleCache\CacheInterface; use seekat\API\Call\Cache\Service; final class Simple implements Service { - /** - * @var CacheInterface - */ - private $cache; - - public function __construct(CacheInterface $cache) { - $this->cache = $cache; + public function __construct(private readonly CacheInterface $cache) { } public function fetch(string $key, Response &$response = null) : bool { @@ -25,11 +19,11 @@ final class Simple implements Service { return $this->cache->set($key, $response); } - public function del(string $key) { + public function del(string $key) : void { $this->cache->delete($key); } - public function clear() { + public function clear() : void { $this->cache->clear(); } }