| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | protected function getDateTime() |
||
| 14 | { |
||
| 15 | $offsetFieldName = (string) $this->xmlField->Data->Object->OffsetDate['SrcOffset']; |
||
| 16 | $offsetField = $this->xmlHeader->xpath('//DateOffset[@Name="'. $offsetFieldName .'"]')[0]; |
||
| 17 | |||
| 18 | // currenty only supports offset days |
||
| 19 | $offsetDays = (string) $offsetField->DefaultOffset->Day; // @codingStandardsIgnoreLine |
||
| 20 | $dateInterval = new \DateInterval('P' . $offsetDays . 'D'); |
||
| 21 | |||
| 22 | $dateTime = new \DateTimeImmutable(); |
||
| 23 | return $dateTime->add($dateInterval); |
||
| 24 | } |
||
| 26 |