| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 26 | public function createDateInterval(string $spec): \DateInterval |
||
| 27 | { |
||
| 28 | try { |
||
| 29 | return new \DateInterval($spec); |
||
| 30 | } catch (\Throwable $e) { |
||
| 31 | throw new DateIntervalFactoryException( |
||
| 32 | sprintf('Failed to create a valid \DateInterval instance using \'%s\': %s', $spec, $e->getMessage()), |
||
| 33 | $e->getCode(), |
||
| 34 | $e |
||
| 35 | ); |
||
| 63 |