@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param null $ttl |
| 125 | 125 | * @return bool |
| 126 | 126 | */ |
| 127 | - public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool |
|
| 127 | + public function set(string $key, mixed $value, DateInterval | int | null $ttl = null): bool |
|
| 128 | 128 | { |
| 129 | 129 | if ($this->enabled()) { |
| 130 | 130 | return $this->manager->set($key, $value, $ttl); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * @param null $default |
| 162 | 162 | * @return array |
| 163 | 163 | */ |
| 164 | - public function getMultiple(Traversable|array $keys, mixed $default = null): Traversable|array |
|
| 164 | + public function getMultiple(Traversable | array $keys, mixed $default = null): Traversable | array |
|
| 165 | 165 | { |
| 166 | 166 | return $this->manager->getMultiple($keys, $default); |
| 167 | 167 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * @param null $ttl |
| 174 | 174 | * @return bool |
| 175 | 175 | */ |
| 176 | - public function setMultiple(Traversable|array $values, DateInterval|int|null $ttl = null): bool |
|
| 176 | + public function setMultiple(Traversable | array $values, DateInterval | int | null $ttl = null): bool |
|
| 177 | 177 | { |
| 178 | 178 | return $this->manager->setMultiple($values, $ttl); |
| 179 | 179 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * @param $keys |
| 185 | 185 | * @return bool|void |
| 186 | 186 | */ |
| 187 | - public function deleteMultiple(Traversable|array $keys): bool |
|
| 187 | + public function deleteMultiple(Traversable | array $keys): bool |
|
| 188 | 188 | { |
| 189 | 189 | return $this->manager->deleteMultiple($keys); |
| 190 | 190 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function remember($key, $minutes, Closure $callback) |
| 212 | 212 | { |
| 213 | - if (! \is_null($value = $this->manager->get($key))) { |
|
| 213 | + if (!\is_null($value = $this->manager->get($key))) { |
|
| 214 | 214 | return $value; |
| 215 | 215 | } |
| 216 | 216 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (\is_null($this->dir)) { |
| 66 | 66 | $this->dir = $this->config->cache->directory ?: sys_get_temp_dir().'/__PRAGMARX_COUNTRIES__/cache'; |
| 67 | 67 | |
| 68 | - if (! file_exists($this->dir)) { |
|
| 68 | + if (!file_exists($this->dir)) { |
|
| 69 | 69 | mkdir($this->dir, 0755, true); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * @param null $ttl |
| 120 | 120 | * @return bool |
| 121 | 121 | */ |
| 122 | - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool |
|
| 122 | + public function set(string $key, mixed $value, null | int | \DateInterval $ttl = null): bool |
|
| 123 | 123 | { |
| 124 | 124 | if ($this->enabled()) { |
| 125 | 125 | return $this->cache->save($key, $value, [NetteCache::EXPIRE => $this->makeExpiration($ttl)]); |
@@ -158,9 +158,9 @@ discard block |
||
| 158 | 158 | * @param null $default |
| 159 | 159 | * @return array |
| 160 | 160 | */ |
| 161 | - public function getMultiple(Traversable|array $keys, mixed $default = null): iterable |
|
| 161 | + public function getMultiple(Traversable | array $keys, mixed $default = null): iterable |
|
| 162 | 162 | { |
| 163 | - return coollect($keys)->map(function ($key) { |
|
| 163 | + return coollect($keys)->map(function($key) { |
|
| 164 | 164 | return $this->get($key); |
| 165 | 165 | }); |
| 166 | 166 | } |
@@ -172,9 +172,9 @@ discard block |
||
| 172 | 172 | * @param null $ttl |
| 173 | 173 | * @return bool |
| 174 | 174 | */ |
| 175 | - public function setMultiple(Traversable|array $values, DateInterval|int|null $ttl = null): bool |
|
| 175 | + public function setMultiple(Traversable | array $values, DateInterval | int | null $ttl = null): bool |
|
| 176 | 176 | { |
| 177 | - coollect($values)->map(function ($value, $key) use ($ttl) { |
|
| 177 | + coollect($values)->map(function($value, $key) use ($ttl) { |
|
| 178 | 178 | return $this->set($key, $value, $ttl); |
| 179 | 179 | }); |
| 180 | 180 | |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | * @param $keys |
| 188 | 188 | * @return bool |
| 189 | 189 | */ |
| 190 | - public function deleteMultiple(Traversable|array $keys): bool |
|
| 190 | + public function deleteMultiple(Traversable | array $keys): bool |
|
| 191 | 191 | { |
| 192 | - coollect($keys)->map(function ($key) { |
|
| 192 | + coollect($keys)->map(function($key) { |
|
| 193 | 193 | $this->forget($key); |
| 194 | 194 | }); |
| 195 | 195 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | public function has(string $key): bool |
| 206 | 206 | { |
| 207 | - return ! \is_null($this->get($key)); |
|
| 207 | + return !\is_null($this->get($key)); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | { |
| 220 | 220 | $value = $this->get($key); |
| 221 | 221 | |
| 222 | - if (! \is_null($value)) { |
|
| 222 | + if (!\is_null($value)) { |
|
| 223 | 223 | return $value; |
| 224 | 224 | } |
| 225 | 225 | |