Conditions | 3 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 5 | private function assertName($name) |
|
40 | { |
||
41 | 5 | if (false === is_string($name)) { |
|
42 | 1 | throw new \InvalidArgumentException('The [name] must be of type string.'); |
|
43 | } |
||
44 | |||
45 | 4 | if (0 === preg_match('/^[^*"]*$/', $name)) { |
|
46 | 1 | throw new \InvalidArgumentException('The [name] must match the regular expression /^[^*"]*$/'); |
|
47 | } |
||
62 |