@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | * @param string|int $ttl |
| 30 | 30 | * @return bool |
| 31 | 31 | */ |
| 32 | - public function store(string $cacheKey, mixed $cacheData, string $namespace, string|int $ttl = 3600) |
|
| 32 | + public function store(string $cacheKey, mixed $cacheData, string $namespace, string | int $ttl = 3600) |
|
| 33 | 33 | { |
| 34 | 34 | |
| 35 | - if(!empty($this->retrieve($cacheKey, $namespace))) { |
|
| 35 | + if (!empty($this->retrieve($cacheKey, $namespace))) { |
|
| 36 | 36 | $this->update($cacheKey, $cacheData, $namespace); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param string $namespace |
| 176 | 176 | * @return bool |
| 177 | 177 | */ |
| 178 | - public function renew(string $cacheKey, string|int $ttl, string $namespace = '') |
|
| 178 | + public function renew(string $cacheKey, string | int $ttl, string $namespace = '') |
|
| 179 | 179 | { |
| 180 | 180 | $currentTime = date('Y-m-d H:i:s'); |
| 181 | 181 | if (!$this->hasValidCache($cacheKey, $namespace, $currentTime)) { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | $query = $this->getRenewExpirationQueryWithDriver(); |
| 186 | 186 | $stmt = $this->connection->prepare($query); |
| 187 | - $stmt->bindValue(':ttl', (int) $ttl, PDO::PARAM_INT); |
|
| 187 | + $stmt->bindValue(':ttl', (int)$ttl, PDO::PARAM_INT); |
|
| 188 | 188 | $stmt->bindValue(':cacheKey', $cacheKey); |
| 189 | 189 | $stmt->bindValue(':namespace', $namespace); |
| 190 | 190 | $stmt->bindValue(':currentTime', $currentTime); |