Completed
Push — V3 ( 28b960...d779ad )
by Georges
01:47
created
src/Response/CacheableResponse.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * @param string $cacheKey
42 42
      * @param int|\DateInterval $expiresAfter
43 43
      * @param callable $callback
44
-     * @return mixed
44
+     * @return Response
45 45
      * @throws PhpfastcacheLogicException
46 46
      */
47 47
     public function getResponse(string $cacheKey, $expiresAfter = null, callable $callback): Response
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
                 $this->cacheInstance->save($cacheItem);
71 71
                 $cacheResponse = $response;
72 72
             }else{
73
-               throw new PhpfastcacheLogicException('Your callback response MUST return a valid Symfony HTTP Foundation Response object');
73
+                throw new PhpfastcacheLogicException('Your callback response MUST return a valid Symfony HTTP Foundation Response object');
74 74
             }
75 75
         }else{
76 76
             $cacheResponse->isNotModified($this->request);
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,10 +69,10 @@
 block discarded – undo
69 69
                 $cacheItem->set($response);
70 70
                 $this->cacheInstance->save($cacheItem);
71 71
                 $cacheResponse = $response;
72
-            }else{
72
+            } else{
73 73
                throw new PhpfastcacheLogicException('Your callback response MUST return a valid Symfony HTTP Foundation Response object');
74 74
             }
75
-        }else{
75
+        } else{
76 76
             $cacheResponse->isNotModified($this->request);
77 77
         }
78 78
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
          */
65 65
         if (!($cacheResponse instanceof Response)) {
66 66
             $response = $callback();
67
-            if($response instanceof Response){
67
+            if ($response instanceof Response) {
68 68
                 $cacheItem->expiresAfter($expiresAfter);
69 69
 
70 70
                 /**
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
                 $cacheItem->set($response);
81 81
                 $this->cacheInstance->save($cacheItem);
82 82
                 $cacheResponse = $response;
83
-            }else{
83
+            } else {
84 84
                throw new PhpfastcacheLogicException('Your callback response MUST return a valid Symfony HTTP Foundation Response object');
85 85
             }
86
-        }else{
86
+        } else {
87 87
             $cacheResponse->isNotModified($this->request);
88 88
         }
89 89
 
Please login to merge, or discard this patch.