@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (\is_null($this->dir)) { |
64 | 64 | $this->dir = $this->config->cache->directory ?: sys_get_temp_dir().'/__PRAGMARX_COUNTRIES__/cache'; |
65 | 65 | |
66 | - if (! file_exists($this->dir)) { |
|
66 | + if (!file_exists($this->dir)) { |
|
67 | 67 | mkdir($this->dir, 0755, true); |
68 | 68 | } |
69 | 69 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param null $ttl |
118 | 118 | * @return bool |
119 | 119 | */ |
120 | - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool |
|
120 | + public function set(string $key, mixed $value, null | int | \DateInterval $ttl = null): bool |
|
121 | 121 | { |
122 | 122 | if ($this->enabled()) { |
123 | 123 | return $this->cache->save($key, $value, [NetteCache::EXPIRE => $this->makeExpiration($ttl)]); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function getMultiple(iterable $keys, mixed $default = null): iterable |
158 | 158 | { |
159 | - return coollect($keys)->map(function ($key) { |
|
159 | + return coollect($keys)->map(function($key) { |
|
160 | 160 | return $this->get($key); |
161 | 161 | }); |
162 | 162 | } |
@@ -168,9 +168,9 @@ discard block |
||
168 | 168 | * @param null $ttl |
169 | 169 | * @return bool |
170 | 170 | */ |
171 | - public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool |
|
171 | + public function setMultiple(iterable $values, null | int | \DateInterval $ttl = null): bool |
|
172 | 172 | { |
173 | - coollect($values)->map(function ($value, $key) use ($ttl) { |
|
173 | + coollect($values)->map(function($value, $key) use ($ttl) { |
|
174 | 174 | return $this->set($key, $value, $ttl); |
175 | 175 | }); |
176 | 176 | return true; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function deleteMultiple(iterable $keys): bool |
186 | 186 | { |
187 | - coollect($keys)->map(function ($key) { |
|
187 | + coollect($keys)->map(function($key) { |
|
188 | 188 | $this->forget($key); |
189 | 189 | }); |
190 | 190 | return true; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function has(string $key): bool |
200 | 200 | { |
201 | - return ! \is_null($this->get($key)); |
|
201 | + return !\is_null($this->get($key)); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | { |
214 | 214 | $value = $this->get($key); |
215 | 215 | |
216 | - if (! \is_null($value)) { |
|
216 | + if (!\is_null($value)) { |
|
217 | 217 | return $value; |
218 | 218 | } |
219 | 219 |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * @param null $ttl |
121 | 121 | * @return bool |
122 | 122 | */ |
123 | - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool |
|
123 | + public function set(string $key, mixed $value, null | int | \DateInterval $ttl = null): bool |
|
124 | 124 | { |
125 | 125 | if ($this->enabled()) { |
126 | 126 | return $this->manager->set($key, $value, $ttl); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * @param null $ttl |
169 | 169 | * @return bool |
170 | 170 | */ |
171 | - public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool |
|
171 | + public function setMultiple(iterable $values, null | int | \DateInterval $ttl = null): bool |
|
172 | 172 | { |
173 | 173 | return $this->manager->setMultiple($keys, $ttl); |
174 | 174 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | */ |
205 | 205 | public function remember($key, $minutes, Closure $callback) |
206 | 206 | { |
207 | - if (! \is_null($value = $this->manager->get($key))) { |
|
207 | + if (!\is_null($value = $this->manager->get($key))) { |
|
208 | 208 | return $value; |
209 | 209 | } |
210 | 210 |