Passed
Pull Request — master (#3)
by Joel
04:41
created
src/Charcoal/Cache/Middleware/CacheMiddleware.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
             'ttl'            => CacheConfig::DAY_IN_SECONDS,
153 153
 
154 154
             'included_path'  => '*',
155
-            'excluded_path'  => [ '^/admin\b' ],
155
+            'excluded_path'  => ['^/admin\b'],
156 156
 
157
-            'methods'        => [ 'GET' ],
158
-            'status_codes'   => [ 200 ],
157
+            'methods'        => ['GET'],
158
+            'status_codes'   => [200],
159 159
 
160 160
             'included_query' => null,
161 161
             'excluded_query' => null,
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $uri = $uri->withQuery($queryStr);
274 274
         }
275 275
 
276
-        $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri);
276
+        $cacheKey = 'request/'.$request->getMethod().'/'.md5((string)$uri);
277 277
 
278 278
         $callback = $this->processCacheKeyCallback;
279 279
         if (is_callable($callback)) {
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         }
349 349
 
350 350
         foreach ((array)$this->includedPath as $included) {
351
-            if (preg_match('@' . $included . '@', $path)) {
351
+            if (preg_match('@'.$included.'@', $path)) {
352 352
                 return true;
353 353
             }
354 354
         }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         }
374 374
 
375 375
         foreach ((array)$this->excludedPath as $excluded) {
376
-            if (preg_match('@' . $excluded . '@', $path)) {
376
+            if (preg_match('@'.$excluded.'@', $path)) {
377 377
                 return true;
378 378
             }
379 379
         }
Please login to merge, or discard this patch.