Total Complexity | 2 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | trait UnsignedShortTrait |
||
13 | { |
||
14 | /** @var string */ |
||
15 | private static string $unsignedShort_regex = '/^ |
||
16 | ( |
||
17 | ([+]?0*) |
||
18 | (?: |
||
19 | [1-9] |
||
20 | |[1-9]\d{1,3} |
||
21 | |[1-5]\d{4} |
||
22 | |6[0-4]\d{3} |
||
23 | |65[0-4]\d{2} |
||
24 | |655[0-2]\d |
||
25 | |6553[0-5] |
||
26 | ) |
||
27 | |0 |
||
28 | ) |
||
29 | $/Dx'; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param string $value |
||
34 | * @param string $message |
||
35 | */ |
||
36 | protected static function validUnsignedShort(string $value, string $message = ''): void |
||
46 |