projects
/
m6w6
/
seekat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
update to PHP-8.1
[m6w6/seekat]
/
lib
/
API
/
Call
/
Cache
/
Service
/
Simple.php
diff --git
a/lib/API/Call/Cache/Service/Simple.php
b/lib/API/Call/Cache/Service/Simple.php
index 4358f1f2f17f37233a6df9a612aa206e1f728227..45bd5fe0bc192d6aafbb457393ec7b4906f807cc 100644
(file)
--- 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 {
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 {
}
public function fetch(string $key, Response &$response = null) : bool {
@@
-25,11
+19,11
@@
final class Simple implements Service {
return $this->cache->set($key, $response);
}
return $this->cache->set($key, $response);
}
- public function del(string $key) {
+ public function del(string $key)
: void
{
$this->cache->delete($key);
}
$this->cache->delete($key);
}
- public function clear() {
+ public function clear()
: void
{
$this->cache->clear();
}
}
$this->cache->clear();
}
}