Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
27 | 23 | public function validate(): void |
|
28 | { |
||
29 | 23 | $validator = new NameDatabaseValidator(); |
|
30 | |||
31 | 23 | $violations = $validator->validate($this->name); |
|
32 | |||
33 | 23 | if (\count($violations)) { |
|
34 | 12 | throw new DatabaseValidationException( |
|
35 | 12 | \sprintf('Database name [%1$s] invalid', $this->name) |
|
36 | ); |
||
40 |