| Total Complexity | 2 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait ByteTrait |
||
| 13 | { |
||
| 14 | private static string $byte_regex = '/^ |
||
| 15 | ( |
||
| 16 | ( |
||
| 17 | ( |
||
| 18 | -[0]* |
||
| 19 | ( |
||
| 20 | [0-9] |
||
| 21 | |[1-8]\d |
||
| 22 | |9\d |
||
| 23 | |1[01]\d |
||
| 24 | |12[0-8] |
||
| 25 | ) |
||
| 26 | )|( |
||
| 27 | [+]?[0]* |
||
| 28 | ( |
||
| 29 | [0-9] |
||
| 30 | |[1-8]\d |
||
| 31 | |9\d |
||
| 32 | |1[01]\d |
||
| 33 | |12[0-7] |
||
| 34 | ) |
||
| 35 | )|0 |
||
| 36 | ) |
||
| 37 | )$/Dx'; |
||
| 38 | |||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $value |
||
| 42 | * @param string $message |
||
| 43 | */ |
||
| 44 | protected static function validByte(string $value, string $message = ''): void |
||
| 54 |