Total Complexity | 2 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | trait ShortTrait |
||
13 | { |
||
14 | /** @var string */ |
||
15 | private static string $short_regex = '/^(((-[0]*([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[12][0-9]{4}|3[01][0-9]{3}|32[0-6][0-9]{2}|327[0-5][0-9]|3276[0-8]))|([+]?[0]*([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[12][0-9]{4}|3[01][0-9]{3}|32[0-6][0-9]{2}|327[0-5][0-9]|3276[0-7]))|0))$/D'; |
||
16 | |||
17 | |||
18 | /** |
||
19 | * @param string $value |
||
20 | * @param string $message |
||
21 | */ |
||
22 | protected static function validShort(string $value, string $message = ''): void |
||
32 |