mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-19 04:58:41 +00:00
Fix typehint
This commit is contained in:
parent
6fd1ebe9b1
commit
cfab6d9caf
|
|
@ -153,7 +153,7 @@ class Auth
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
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');
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ interface CacheInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
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 <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setStatus(int $status);
|
||||
public function setStatus(int $status) /* : void */;
|
||||
|
||||
/**
|
||||
* Updating existing value/key.
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class CachePool implements OptionsInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function create(string $key, array $config)
|
||||
public function create(string $key, array $config) : bool
|
||||
{
|
||||
if (isset($this->pool[$key])) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -83,10 +83,8 @@ class FileCache implements CacheInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user