Passed
Pull Request — master (#332)
by
unknown
06:41
created
src/Cache/FileStore.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,6 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.