Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | 2 | public static function verify($prefix) |
|
25 | { |
||
26 | 2 | if (preg_match('~^[a-z]{3,}$~', $prefix)) { |
|
27 | 2 | return $prefix; |
|
28 | } |
||
29 | |||
30 | 1 | throw new UnexpectedValueException(sprintf( |
|
31 | 1 | 'invalid prefix: "%s"; a prefix is only lower-case letters with a minimum length of three characters', |
|
32 | $prefix |
||
33 | )); |
||
56 |