We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | 26 | private function validateWithFormat(string $input, string $format): bool |
|
| 53 | { |
||
| 54 | 26 | if (isset(self::EXCEPTIONAL_FORMATS[$format])) { |
|
| 55 | 8 | $format = self::EXCEPTIONAL_FORMATS[$format]; |
|
| 56 | } |
||
| 57 | |||
| 58 | 26 | $info = date_parse_from_format($format, $input); |
|
| 59 | |||
| 60 | 26 | return $info['error_count'] === 0 && $info['warning_count'] === 0; |
|
| 61 | } |
||
| 62 | } |
||
| 63 |