改名
This commit is contained in:
+7
-15
@@ -24,14 +24,6 @@ class File extends Component implements ICache
|
||||
{
|
||||
public string $path;
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
parent::init(); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @param $val
|
||||
@@ -71,9 +63,9 @@ class File extends Component implements ICache
|
||||
/**
|
||||
* @param $key
|
||||
* @param array $val
|
||||
* @return mixed
|
||||
* @return bool|int|string
|
||||
*/
|
||||
public function hMSet($key, array $val): mixed
|
||||
public function hMSet($key, array $val): bool|int|string
|
||||
{
|
||||
$hash = $this->get($key);
|
||||
if (!is_array($hash)) {
|
||||
@@ -87,24 +79,24 @@ class File extends Component implements ICache
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string $hashKey
|
||||
* @return string|int|bool|null
|
||||
* @return string|int|bool
|
||||
*/
|
||||
public function hGet(string $key, string $hashKey): string|int|bool|null
|
||||
public function hGet(string $key, string $hashKey): string|int|bool
|
||||
{
|
||||
$hash = $this->get($key);
|
||||
if (!is_array($hash)) {
|
||||
return false;
|
||||
}
|
||||
return $hash[$hashKey] ?? null;
|
||||
return $hash[$hashKey] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @param $hashKey
|
||||
* @param $hashValue
|
||||
* @return mixed
|
||||
* @return bool|int|string
|
||||
*/
|
||||
public function hSet($key, $hashKey, $hashValue): mixed
|
||||
public function hSet($key, $hashKey, $hashValue): bool|int|string
|
||||
{
|
||||
$hash = $this->get($key);
|
||||
if (!is_array($hash)) {
|
||||
|
||||
Reference in New Issue
Block a user