@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @param int|string $ttl |
| 71 | 71 | * @return bool |
| 72 | 72 | */ |
| 73 | - public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600) |
|
| 73 | + public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600) |
|
| 74 | 74 | { |
| 75 | 75 | if (!empty($this->getCache($cacheKey, $namespace))) { |
| 76 | 76 | return true; |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string|int $ttl |
| 161 | 161 | * @return CacheDataFormatter|mixed |
| 162 | 162 | */ |
| 163 | - public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600) |
|
| 163 | + public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600) |
|
| 164 | 164 | { |
| 165 | 165 | $cacheData = $this->cacheStore->getCache($cacheKey, $namespace, $ttl); |
| 166 | 166 | $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess()); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | { |
| 194 | 194 | $cacheData = $this->getCache($cacheKey, $namespace); |
| 195 | 195 | |
| 196 | - if(!empty($cacheData) && is_numeric($cacheData)) { |
|
| 196 | + if (!empty($cacheData) && is_numeric($cacheData)) { |
|
| 197 | 197 | $this->putCache($cacheKey, (int)($cacheData + $amount), $namespace); |
| 198 | 198 | $this->setMessage($this->getMessage(), $this->isSuccess()); |
| 199 | 199 | return true; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * @param string|int $ttl |
| 218 | 218 | * @return void |
| 219 | 219 | */ |
| 220 | - public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600) |
|
| 220 | + public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600) |
|
| 221 | 221 | { |
| 222 | 222 | $data = CacheerHelper::prepareForStorage($cacheData, $this->compression, $this->encryptionKey); |
| 223 | 223 | $this->cacheStore->putCache($cacheKey, $data, $namespace, $ttl); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * @param string $namespace |
| 242 | 242 | * @return void |
| 243 | 243 | */ |
| 244 | - public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = '') |
|
| 244 | + public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = '') |
|
| 245 | 245 | { |
| 246 | 246 | $this->cacheStore->renewCache($cacheKey, $ttl, $namespace); |
| 247 | 247 | |
@@ -258,11 +258,11 @@ discard block |
||
| 258 | 258 | * @param Closure $callback |
| 259 | 259 | * @return mixed |
| 260 | 260 | */ |
| 261 | - public function remember(string $cacheKey, int|string $ttl, Closure $callback) |
|
| 261 | + public function remember(string $cacheKey, int | string $ttl, Closure $callback) |
|
| 262 | 262 | { |
| 263 | 263 | $cachedData = $this->getCache($cacheKey, ttl: $ttl); |
| 264 | 264 | |
| 265 | - if(!empty($cachedData)) { |
|
| 265 | + if (!empty($cachedData)) { |
|
| 266 | 266 | return $cachedData; |
| 267 | 267 | } |
| 268 | 268 | |