| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | trait TimeTrait |
||
| 16 | { |
||
| 17 | /** @var string */ |
||
| 18 | private static string $time_regex = '/^([0-1][0-9]|2[0-4]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])(\.[0-9]{0,6})?((\+|-)([0-1][0-9]|2[0-4]):(0[0-9]|[1-5][0-9])|Z)?$/Di'; |
||
| 19 | |||
| 20 | /*********************************************************************************** |
||
| 21 | * NOTE: Custom assertions may be added below this line. * |
||
| 22 | * They SHOULD be marked as `protected` to ensure the call is forced * |
||
| 23 | * through __callStatic(). * |
||
| 24 | * Assertions marked `public` are called directly and will * |
||
| 25 | * not handle any custom exception passed to it. * |
||
| 26 | ***********************************************************************************/ |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $value |
||
| 31 | * @param string $message |
||
| 32 | */ |
||
| 33 | protected static function validTime(string $value, string $message = ''): void |
||
| 43 |