diff --git a/Auth/Auth.php b/Auth/Auth.php index 65ca6cdae..332549186 100644 --- a/Auth/Auth.php +++ b/Auth/Auth.php @@ -153,7 +153,7 @@ class Auth * @since 1.0.0 * @author Dennis Eichhorn */ - public function logout(int $uid = null) + public function logout(int $uid = null) /* : void */ { // TODO: logout other users? If admin wants to kick a user for updates etc. $this->session->remove('UID'); diff --git a/DataStorage/Cache/CacheInterface.php b/DataStorage/Cache/CacheInterface.php index 64707104d..97b40b169 100644 --- a/DataStorage/Cache/CacheInterface.php +++ b/DataStorage/Cache/CacheInterface.php @@ -42,7 +42,7 @@ interface CacheInterface * @since 1.0.0 * @author Dennis Eichhorn */ - public function set($key, $value, int $expire = -1); + public function set($key, $value, int $expire = -1) /* : void */; /** * Adding new data if it doesn't exist. @@ -118,7 +118,7 @@ interface CacheInterface * @since 1.0.0 * @author Dennis Eichhorn */ - public function setStatus(int $status); + public function setStatus(int $status) /* : void */; /** * Updating existing value/key. diff --git a/DataStorage/Cache/CachePool.php b/DataStorage/Cache/CachePool.php index efe77ab2f..7bcf2826e 100644 --- a/DataStorage/Cache/CachePool.php +++ b/DataStorage/Cache/CachePool.php @@ -130,7 +130,7 @@ class CachePool implements OptionsInterface * @since 1.0.0 * @author Dennis Eichhorn */ - public function create(string $key, array $config) + public function create(string $key, array $config) : bool { if (isset($this->pool[$key])) { return false; diff --git a/DataStorage/Cache/FileCache.php b/DataStorage/Cache/FileCache.php index 13154b953..b2c748c1f 100644 --- a/DataStorage/Cache/FileCache.php +++ b/DataStorage/Cache/FileCache.php @@ -83,10 +83,8 @@ class FileCache implements CacheInterface * @since 1.0.0 * @author Dennis Eichhorn */ - public function __construct(array $config) + public function __construct(string $path) { - $path = $config['path'] ?? ''; - if (!File::exists($path)) { Directory::create($path); } @@ -111,7 +109,8 @@ class FileCache implements CacheInterface /** * {@inheritdoc} */ - public function setStatus(int $status) { + public function setStatus(int $status) /* : void */ + { if(!CacheStatus::isValidValue($status)) { throw new InvalidEnumValue($status); }