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