| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | public function createDateInterval(string $spec): \DateInterval |
||
| 15 | { |
||
| 16 | try { |
||
| 17 | return new \DateInterval($spec); |
||
| 18 | } catch (\Exception $e) { |
||
| 19 | throw new DateIntervalFactoryException( |
||
| 20 | sprintf('Failed to create a valid \DateInterval instance using \'%s\'', $spec), |
||
| 21 | $e->getCode(), |
||
| 22 | $e, |
||
| 23 | ); |
||
| 27 |