Total Complexity | 6 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | trait TokensTrait |
||
16 | { |
||
17 | /** @var string */ |
||
18 | private static string $nmtoken_regex = '/^[\w.:-]+$/Du'; |
||
19 | |||
20 | /** @var string */ |
||
21 | private static string $nmtokens_regex = '/^([\w.:-]+)([\s][\w.:-]+)*$/Du'; |
||
22 | |||
23 | /*********************************************************************************** |
||
24 | * NOTE: Custom assertions may be added below this line. * |
||
25 | * They SHOULD be marked as `protected` to ensure the call is forced * |
||
26 | * through __callStatic(). * |
||
27 | * Assertions marked `public` are called directly and will * |
||
28 | * not handle any custom exception passed to it. * |
||
29 | ***********************************************************************************/ |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param string $value |
||
34 | * @param string $message |
||
35 | */ |
||
36 | protected static function validNMToken(string $value, string $message = ''): void |
||
42 | )); |
||
43 | } |
||
44 | } |
||
45 | |||
46 | |||
47 | /** |
||
48 | * @param string $value |
||
49 | * @param string $message |
||
50 | */ |
||
51 | protected static function validNMTokens(string $value, string $message = ''): void |
||
61 |