| 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 |
||
| 21 | 1 | public static function verify($prefix) |
|
| 22 | { |
||
| 23 | 1 | if (preg_match('~^[a-z]{3,}$~', $prefix)) { |
|
| 24 | 1 | return $prefix; |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | throw new UnexpectedValueException(sprintf( |
|
| 28 | 1 | 'invalid prefix: "%s"; a prefix is only lower-case letters with a minimum length of three characters', |
|
| 29 | $prefix |
||
| 30 | )); |
||
| 33 |