Completed
Push — V3 ( c9215a...5cd01a )
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
          */
58 58
         if (!($cacheResponse instanceof Response)) {
59 59
             $response = $callback();
60
-            if($response instanceof Response){
60
+            if ($response instanceof Response) {
61 61
                 $cacheItem->expiresAfter($expiresAfter);
62 62
 
63 63
                 $response->setExpires($cacheItem->getExpirationDate());
@@ -69,10 +69,10 @@  discard block
 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.
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.