Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
54 | public function getResponse(string $format, FeedInterface $feed): Response |
||
55 | { |
||
56 | if ($this->forceRefresh || $feed->getLastModified() > $this->modifiedSince->getValue()) { |
||
57 | $response = new Response($this->feedIo->format($feed, $format)); |
||
58 | $this->headersBuilder->setResponseHeaders($response, $format, $feed->getLastModified()); |
||
59 | } else { |
||
60 | $response = new Response(); |
||
61 | $response->setNotModified(); |
||
62 | } |
||
63 | |||
64 | return $response; |
||
65 | } |
||
66 | } |
||
67 |