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); |
||
24 | 25 | public function validate(): void |
|
25 | { |
||
26 | 25 | $validator = new NameDatabaseValidator(); |
|
27 | |||
28 | 25 | $violations = $validator->validate($this->name); |
|
29 | |||
30 | 25 | if (\count($violations) > 0) { |
|
31 | 12 | throw new DatabaseValidationException( |
|
32 | 12 | \sprintf('Database name [%1$s] invalid', $this->name) |
|
33 | ); |
||
37 |