mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 14:08:40 +00:00
Fix typehint
This commit is contained in:
parent
6fd1ebe9b1
commit
cfab6d9caf
|
|
@ -153,7 +153,7 @@ class Auth
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @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.
|
// TODO: logout other users? If admin wants to kick a user for updates etc.
|
||||||
$this->session->remove('UID');
|
$this->session->remove('UID');
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ interface CacheInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @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.
|
* Adding new data if it doesn't exist.
|
||||||
|
|
@ -118,7 +118,7 @@ interface CacheInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function setStatus(int $status);
|
public function setStatus(int $status) /* : void */;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updating existing value/key.
|
* Updating existing value/key.
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class CachePool implements OptionsInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @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])) {
|
if (isset($this->pool[$key])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,8 @@ class FileCache implements CacheInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function __construct(array $config)
|
public function __construct(string $path)
|
||||||
{
|
{
|
||||||
$path = $config['path'] ?? '';
|
|
||||||
|
|
||||||
if (!File::exists($path)) {
|
if (!File::exists($path)) {
|
||||||
Directory::create($path);
|
Directory::create($path);
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +109,8 @@ class FileCache implements CacheInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function setStatus(int $status) {
|
public function setStatus(int $status) /* : void */
|
||||||
|
{
|
||||||
if(!CacheStatus::isValidValue($status)) {
|
if(!CacheStatus::isValidValue($status)) {
|
||||||
throw new InvalidEnumValue($status);
|
throw new InvalidEnumValue($status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user