diff --git a/src/System/Cache/Storage/FileStorage.php b/src/System/Cache/Storage/FileStorage.php index aa475d3e..4481e836 100644 --- a/src/System/Cache/Storage/FileStorage.php +++ b/src/System/Cache/Storage/FileStorage.php @@ -32,13 +32,11 @@ public function getInfo(string $key): array $data = file_get_contents($filePath); - if ($data === false) { + if (false === $data) { return []; } - $cacheData = unserialize($data); - - return $cacheData; + return unserialize($data); } public function get(string $key, mixed $default = null): mixed @@ -71,7 +69,7 @@ public function set(string $key, mixed $value, int|\DateInterval|null $ttl = nul $filePath = $this->makePath($key); $directory = dirname($filePath); - if (!is_dir($directory)) { + if (false === is_dir($directory)) { mkdir($directory, 0777, true); }