diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:10:49 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:10:49 +0000 |
| commit | 7fbf01fafcbc022831e9717a892a084b3c6e6e59 (patch) | |
| tree | 7520a5af1ba8bffc5664544fd3c76cdff4c33de4 /lib/classes/cache/MemoryCache.class.php | |
| parent | eb4f3bba75580ee1bd04e2b6677028ff28e6a1af (diff) | |
update psr/cache to 3.0.0 and adjust everything necessary, fixes #4152
Closes #4152
Merge request studip/studip!2992
Diffstat (limited to 'lib/classes/cache/MemoryCache.class.php')
| -rw-r--r-- | lib/classes/cache/MemoryCache.class.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/classes/cache/MemoryCache.class.php b/lib/classes/cache/MemoryCache.class.php index 93f6bbd..7c00753 100644 --- a/lib/classes/cache/MemoryCache.class.php +++ b/lib/classes/cache/MemoryCache.class.php @@ -19,11 +19,11 @@ class MemoryCache extends Cache /** * Expires just a single key. * - * @param string the key + * @param string $arg the key */ - public function expire($key) + public function expire($arg) { - unset($this->memory_cache[$key]); + unset($this->memory_cache[$arg]); } /** @@ -52,7 +52,7 @@ class MemoryCache extends Cache /** * @inheritDoc */ - public function getItem($key) + public function getItem(string $key): CacheItemInterface { $item = new Item($key); if (!isset($this->memory_cache[$key])) { @@ -75,7 +75,7 @@ class MemoryCache extends Cache /** * @inheritDoc */ - public function hasItem($key) + public function hasItem(string $key): bool { return isset($this->memory_cache[$key]) && $this->memory_cache[$key]['expires'] < time(); @@ -84,7 +84,7 @@ class MemoryCache extends Cache /** * @inheritDoc */ - public function save(CacheItemInterface $item) + public function save(CacheItemInterface $item): bool { $expiration = $this->getExpiration($item); |
