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