@@ -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); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param null $default |
160 | 160 | * @return array |
161 | 161 | */ |
162 | - public function getMultiple(Traversable|array $keys, mixed $default = null): Traversable|array |
|
162 | + public function getMultiple(Traversable | array $keys, mixed $default = null): Traversable | array |
|
163 | 163 | { |
164 | 164 | return $this->manager->getMultiple($keys, $default); |
165 | 165 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @param null $ttl |
172 | 172 | * @return bool |
173 | 173 | */ |
174 | - public function setMultiple(Traversable|array $values, DateInterval|int|null $ttl = null): bool |
|
174 | + public function setMultiple(Traversable | array $values, DateInterval | int | null $ttl = null): bool |
|
175 | 175 | { |
176 | 176 | return $this->manager->setMultiple($keys, $ttl); |
177 | 177 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | * @param $keys |
183 | 183 | * @return bool|void |
184 | 184 | */ |
185 | - public function deleteMultiple(Traversable|array $keys): bool |
|
185 | + public function deleteMultiple(Traversable | array $keys): bool |
|
186 | 186 | { |
187 | 187 | $this->manager->deleteMultiple($keys); |
188 | 188 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function remember($key, $minutes, Closure $callback) |
210 | 210 | { |
211 | - if (! \is_null($value = $this->manager->get($key))) { |
|
211 | + if (!\is_null($value = $this->manager->get($key))) { |
|
212 | 212 | return $value; |
213 | 213 | } |
214 | 214 |
@@ -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, DateInterval|int|null $ttl = null): bool |
|
122 | + public function set(string $key, mixed $value, DateInterval | int | null $ttl = null): bool |
|
123 | 123 | { |
124 | 124 | if ($this->enabled()) { |
125 | 125 | return $this->cache->save($key, $value, [NetteCache::EXPIRE => $this->makeExpiration($ttl)]); |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | * @param null $default |
155 | 155 | * @return array |
156 | 156 | */ |
157 | - public function getMultiple(Traversable|array $keys, mixed $default = null): Traversable|array |
|
157 | + public function getMultiple(Traversable | array $keys, mixed $default = null): Traversable | array |
|
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(Traversable|array $values, DateInterval|int|null $ttl = null): bool |
|
171 | + public function setMultiple(Traversable | array $values, DateInterval | int | null $ttl = null): bool |
|
172 | 172 | { |
173 | - return coollect($values)->map(function ($value, $key) use ($ttl) { |
|
173 | + return coollect($values)->map(function($value, $key) use ($ttl) { |
|
174 | 174 | return $this->set($key, $value, $ttl); |
175 | 175 | }); |
176 | 176 | } |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | * @param $keys |
182 | 182 | * @return bool|void |
183 | 183 | */ |
184 | - public function deleteMultiple(Traversable|array $keys): bool |
|
184 | + public function deleteMultiple(Traversable | array $keys): bool |
|
185 | 185 | { |
186 | - coollect($keys)->map(function ($key) { |
|
186 | + coollect($keys)->map(function($key) { |
|
187 | 187 | $this->forget($key); |
188 | 188 | }); |
189 | 189 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function has(string $key): bool |
198 | 198 | { |
199 | - return ! \is_null($this->get($key)); |
|
199 | + return !\is_null($this->get($key)); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | { |
212 | 212 | $value = $this->get($key); |
213 | 213 | |
214 | - if (! \is_null($value)) { |
|
214 | + if (!\is_null($value)) { |
|
215 | 215 | return $value; |
216 | 216 | } |
217 | 217 |