| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function createDateTimeZone(string $spec): \DateTimeZone |
||
| 37 | { |
||
| 38 | try { |
||
| 39 | /** @throws \Exception */ |
||
| 40 | return new $this->dateTimeZoneClassName($spec); |
||
| 41 | } catch (\Exception $e) { |
||
| 42 | throw new DateTimeZoneFactoryException( |
||
| 43 | sprintf('Failed to create a valid \DateTimeZone instance using \'%s\'', $spec), |
||
| 44 | $e->getCode(), |
||
| 45 | $e |
||
| 46 | ); |
||
| 50 |