Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function buildRedirectResponse(string $location): ResponseInterface |
||
24 | { |
||
25 | $statusCode = $this->options->redirectStatusCode(); |
||
26 | $headers = $statusCode === StatusCodeInterface::STATUS_FOUND ? [] : [ |
||
27 | 'Cache-Control' => sprintf('private,max-age=%s', $this->options->redirectCacheLifetime()), |
||
28 | ]; |
||
29 | |||
30 | return new RedirectResponse($location, $statusCode, $headers); |
||
31 | } |
||
33 |