@@ -41,7 +41,7 @@ |
||
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 |
@@ -70,7 +70,7 @@ |
||
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); |
@@ -69,10 +69,10 @@ |
||
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 |
@@ -64,7 +64,7 @@ discard block |
||
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 |
||
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 |