Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
24 | 3 | public function correct(Result $result): FixerAbstract |
|
25 | { |
||
26 | 3 | $feed = $result->getFeed(); |
|
27 | 3 | $response = $result->getResponse(); |
|
28 | |||
29 | 3 | if ($this->isInvalid($feed) && $response->getLastModified() instanceof \DateTime) { |
|
30 | 1 | $this->logger->debug("found last modified: " . $response->getLastModified()->format(\DateTime::RSS)); |
|
31 | 1 | $feed->setLastModified($response->getLastModified()); |
|
32 | 1 | $this->correctItems($feed); |
|
33 | } |
||
34 | |||
35 | 3 | return $this; |
|
36 | } |
||
37 | |||
54 |