Completed
Push — 4.0 ( 8ab097...4b479b )
by Marco
03:24
created
src/Comodojo/Dispatcher/Components/ServerCache.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@
 block discarded – undo
47 47
 
48 48
         $cache_object = $this->cache->setNamespace('dispatcherservice')->get($name);
49 49
 
50
-        if ( is_null($cache_object) ) return false;
50
+        if ( is_null($cache_object) ) {
51
+            return false;
52
+        }
51 53
 
52 54
         $response->import($cache);
53 55
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
         Cache $cache
44 44
     ) {
45 45
 
46
-        $name = (string) $request->method . (string) $request->uri;
46
+        $name = (string)$request->method.(string)$request->uri;
47 47
 
48 48
         $cache_object = $cache->setNamespace('dispatcherservice')->get($name);
49 49
 
50
-        if ( is_null($cache_object) ) return false;
50
+        if (is_null($cache_object)) return false;
51 51
 
52 52
         $response->import($cache);
53 53
 
@@ -66,17 +66,17 @@  discard block
 block discarded – undo
66 66
 
67 67
         $ttl = $route->getParameter('ttl');
68 68
 
69
-        $name = (string) $request->method . (string) $request->uri;
69
+        $name = (string)$request->method.(string)$request->uri;
70 70
 
71 71
         $method = $request->method->get();
72 72
 
73 73
         $status = $response->status->get();
74 74
 
75 75
         if (
76
-            ( $cache == 'SERVER' || $cache == 'BOTH' ) &&
76
+            ($cache == 'SERVER' || $cache == 'BOTH') &&
77 77
             in_array($method, self::$cachable_methods) &&
78 78
             in_array($status, self::$cachable_statuses)
79
-        ){
79
+        ) {
80 80
 
81 81
             $cache->setNamespace('dispatcherservice')->set($name, $response->export(), $ttl);
82 82
 
Please login to merge, or discard this patch.