Total Complexity | 6 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class DateHeader extends AbstractHeader |
||
21 | { |
||
22 | /** |
||
23 | * Returns a DateConsumer. |
||
24 | * |
||
25 | * @param ConsumerService $consumerService |
||
26 | * @return \ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer |
||
27 | */ |
||
28 | 4 | protected function getConsumer(ConsumerService $consumerService) |
|
29 | { |
||
30 | 4 | return $consumerService->getDateConsumer(); |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * Convenience method returning the part's DateTime object, or null if the |
||
35 | * date could not be parsed. |
||
36 | * |
||
37 | * @return \DateTime |
||
38 | */ |
||
39 | 3 | public function getDateTime() |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Returns a DateTimeImmutable for the part's DateTime object, or null if |
||
49 | * the date could not be parsed. |
||
50 | * |
||
51 | * @return \DateTimeImmutable |
||
52 | */ |
||
53 | 2 | public function getDateTimeImmutable() |
|
62 |