| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public static function parseDate($date, string $format = self::ISO_DATE_FORMAT): DateTimeInterface |
||
| 14 | { |
||
| 15 | $date = self::tryParseDate($date, $format); |
||
| 16 | |||
| 17 | if (!$date) { |
||
|
|
|||
| 18 | throw new InvalidArgumentException("Invalid date format ($date does not conform to $format)"); |
||
| 19 | } |
||
| 20 | |||
| 21 | return $date; |
||
| 22 | } |
||
| 33 |