| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | 20 | public function terminate(Request $request, Response $response) |
|
| 42 | { |
||
| 43 | 8 | $store = function () use ($request, $response) { |
|
| 44 | 28 | if ($this->staticRequestCache->shouldStoreResponse($request, $response)) { |
|
| 45 | 21 | $this->staticRequestCache->store($request, $response); |
|
| 46 | } |
||
| 47 | 28 | }; |
|
| 48 | |||
| 49 | 28 | if (config('static-html-cache.graceful')) { |
|
| 50 | 21 | rescue($store); |
|
| 51 | } else { |
||
| 52 | 7 | $store(); |
|
| 53 | } |
||
| 56 |