@@ -144,7 +144,6 @@ |
||
144 | 144 | * |
145 | 145 | * @deprecated It is not recommended to use this method, use `lockedSet` instead. |
146 | 146 | * |
147 | - |
|
148 | 147 | */ |
149 | 148 | public function put(string $path, string $contents): int |
150 | 149 | { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return $this->lockedGet( |
115 | 115 | $this->getCacheFile(), |
116 | 116 | false, |
117 | - function ($handler, array $content) use ($withExpired, $key) { |
|
117 | + function($handler, array $content) use ($withExpired, $key) { |
|
118 | 118 | if (empty($content[$key])) { |
119 | 119 | return null; |
120 | 120 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | return $this->lockedSet( |
152 | 152 | $path, |
153 | - function ($data) use ($contents) { |
|
153 | + function($data) use ($contents) { |
|
154 | 154 | return $contents; |
155 | 155 | } |
156 | 156 | ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $this->createCacheFile(); |
169 | 169 | } |
170 | 170 | |
171 | - $this->lockedSet($cacheFile, function (array $data) use ($value, $cacheKey) { |
|
171 | + $this->lockedSet($cacheFile, function(array $data) use ($value, $cacheKey) { |
|
172 | 172 | if ( ! empty($data[$cacheKey]) && \is_array($value)) { |
173 | 173 | $data[$cacheKey] = $value + $data[$cacheKey]; |
174 | 174 | } else { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | return $this->lockedSet( |
191 | 191 | $this->getCacheFile(), |
192 | - function ($data) use ($cacheKey, &$deletion) { |
|
192 | + function($data) use ($cacheKey, &$deletion) { |
|
193 | 193 | if (isset($data[$cacheKey])) { |
194 | 194 | unset($data[$cacheKey]); |
195 | 195 | $deletion = true; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | public function lockedGet(string $path, bool $exclusive = false, ?callable $callback = null) |
319 | 319 | { |
320 | 320 | if ($callback === null) { |
321 | - $callback = function ($handler, $data) { |
|
321 | + $callback = function($handler, $data) { |
|
322 | 322 | return $data; |
323 | 323 | }; |
324 | 324 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | */ |
378 | 378 | public function lockedSet(string $path, callable $callback) |
379 | 379 | { |
380 | - return $this->lockedGet($path, true, function ($handle, array $data) use ($callback) { |
|
380 | + return $this->lockedGet($path, true, function($handle, array $data) use ($callback) { |
|
381 | 381 | $data = $callback($data) ?? []; |
382 | 382 | |
383 | 383 | ftruncate($handle, 0); |