| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 24 | 119 | public function validate(): void |
|
| 25 | { |
||
| 26 | 119 | $validator = new NameUserValidator(); |
|
| 27 | |||
| 28 | 119 | $violations = $validator->validate($this->name); |
|
| 29 | |||
| 30 | 119 | if (\count($violations) > 0) { |
|
| 31 | 12 | throw new NameUserValidationException( |
|
| 32 | 12 | \sprintf("%1\$s:\n%2\$s", $this->name, $violations->get(0)->getPropertyPath()) |
|
| 33 | ); |
||
| 37 |