| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | public function getDateTime(): DateTime |
||
| 57 | { |
||
| 58 | $dateTime = DateTime::createFromFormat(ResponseInterface::DATE_FORMAT, $this->date); |
||
| 59 | |||
| 60 | if (!$dateTime instanceof DateTime) { |
||
| 61 | throw new PoloniexException(sprintf('Unable to get DateTime object for date %s', $this->date)); |
||
| 62 | } |
||
| 63 | |||
| 64 | return $dateTime; |
||
| 65 | } |
||
| 66 | } |