| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait ShortTrait |
||
| 13 | { |
||
| 14 | private static string $short_regex = '/^ |
||
| 15 | ( |
||
| 16 | ( |
||
| 17 | ([+-]?0*) |
||
| 18 | (?: |
||
| 19 | [1-9] |
||
| 20 | |3276[0-7] |
||
| 21 | |[1-9][0-9] |
||
| 22 | |[1-9][0-9][0-9] |
||
| 23 | |[1-9][0-9][0-9][0-9] |
||
| 24 | |[12][0-9][0-9][0-9][0-9] |
||
| 25 | |3[01][0-9][0-9][0-9] |
||
| 26 | |32[0-6][0-9][0-9] |
||
| 27 | |327[0-5][0-9] |
||
| 28 | |[0-9] |
||
| 29 | |3276[0-7] |
||
| 30 | ) |
||
| 31 | ) |
||
| 32 | |0 |
||
| 33 | |((-0*)32768) |
||
| 34 | ) |
||
| 35 | $/Dx'; |
||
| 36 | |||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $value |
||
| 40 | * @param string $message |
||
| 41 | */ |
||
| 42 | protected static function validShort(string $value, string $message = ''): void |
||
| 52 |