| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | protected function getDateTime() |
||
| 31 | { |
||
| 32 | $offsetFieldName = (string) $this->xmlField->Data->Object->OffsetDate['SrcOffset']; |
||
| 33 | |||
| 34 | $offsetField = $this->xmlHeader->xpath('//DateOffset[@Name="'. $offsetFieldName .'"]')[0]; |
||
| 35 | |||
| 36 | // currenty only supports offset days |
||
| 37 | // @codingStandardsIgnoreStart |
||
| 38 | $offsetDays = (string) $offsetField->DefaultOffset->Day; |
||
| 39 | // @codingStandardsIgnoreStart |
||
| 40 | |||
| 41 | $dateInterval = new DateInterval('P' . $offsetDays . 'D'); |
||
| 42 | |||
| 43 | $dateTime = new DateTimeImmutable(); |
||
| 44 | |||
| 45 | return $dateTime->add($dateInterval); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.