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