aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/cache/FileCache.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes/cache/FileCache.class.php')
-rw-r--r--lib/classes/cache/FileCache.class.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/classes/cache/FileCache.class.php b/lib/classes/cache/FileCache.class.php
index e94395a..d760f08 100644
--- a/lib/classes/cache/FileCache.class.php
+++ b/lib/classes/cache/FileCache.class.php
@@ -4,6 +4,7 @@ namespace Studip\Cache;
use Config;
use Exception;
+use Psr\Cache\CacheItemInterface;
/**
* Cache implementation using files
@@ -223,7 +224,7 @@ class FileCache extends Cache
/**
* @inheritDoc
*/
- public function getItem($key)
+ public function getItem(string $key): CacheItemInterface
{
$real_key = $this->getCacheKey($key);
@@ -251,7 +252,7 @@ class FileCache extends Cache
/**
* @inheritDoc
*/
- public function hasItem($key)
+ public function hasItem(string $key): bool
{
$real_key = $this->getCacheKey($key);
$file_data = $this->check($real_key);
@@ -261,7 +262,7 @@ class FileCache extends Cache
/**
* @inheritDoc
*/
- public function save(\Psr\Cache\CacheItemInterface $item)
+ public function save(CacheItemInterface $item): bool
{
$expiration = $this->getExpiration($item);
if ($expiration < 1) {