| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class UntilTransformer extends DtStartTransformer |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param array $values |
||
| 16 | * @return \DateTime |
||
| 17 | * @throws InvalidRruleException |
||
| 18 | */ |
||
| 19 | public function transform(array $values) |
||
| 20 | { |
||
| 21 | 1 | $this->validate($values); |
|
| 22 | |||
| 23 | try { |
||
| 24 | 1 | return parent::transform($values); |
|
| 25 | 1 | } catch (\Exception $e) { |
|
| 26 | 1 | throw new InvalidRruleException(UntilExtractor::RRULE_PARAMETER, (string) $values[0]); |
|
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param array $values |
||
| 32 | * @throws InvalidRruleException |
||
| 33 | */ |
||
| 34 | protected function validate(array $values) |
||
| 38 | } |
||
| 39 | 1 | } |
|
| 41 |