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