From 33c0454b49b3f30e3fd0ba988de8017eae62d162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 18:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Cache/File.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/System/Cache/File.php b/System/Cache/File.php index 6fbe7952..74e2a3e9 100644 --- a/System/Cache/File.php +++ b/System/Cache/File.php @@ -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)) {