Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function transform(array $values): \DateTime |
||
18 | { |
||
19 | 1 | $this->validate($values); |
|
20 | |||
21 | 1 | $dtStart = \DateTime::createFromFormat('Ymd\THis', $values[1], new \DateTimeZone($values[0])); |
|
22 | |||
23 | 1 | if (!$dtStart) { |
|
|
|||
24 | 1 | throw new InvalidRruleException(DtStartTimezonedExtractor::RRULE_PARAMETER, implode(', ', $values)); |
|
25 | } |
||
26 | |||
27 | 1 | return $dtStart; |
|
28 | } |
||
46 |