@@ -41,7 +41,8 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function setDefaultValidator(string $name): void |
| 43 | 43 | { |
| 44 | - if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null) { |
|
| 44 | + if ($this->config->getConfig(ValidationConfig::CONFIG)['defaultValidator'] === null) |
|
| 45 | + { |
|
| 45 | 46 | $this->config->modify(ValidationConfig::CONFIG, new Set('defaultValidator', $name)); |
| 46 | 47 | } |
| 47 | 48 | } |
@@ -53,7 +54,8 @@ discard block |
||
| 53 | 54 | ValidationConfig $config, |
| 54 | 55 | ValidationProviderInterface $provider |
| 55 | 56 | ): ValidationInterface { |
| 56 | - if ($config->getDefaultValidator() === null) { |
|
| 57 | + if ($config->getDefaultValidator() === null) |
|
| 58 | + { |
|
| 57 | 59 | throw new ValidationException('Default Validator is not configured.'); |
| 58 | 60 | } |
| 59 | 61 | |