@@ -23,16 +23,14 @@ |
||
23 | 23 | { |
24 | 24 | return |
25 | 25 | self::$userDefinedFactory instanceof ValidationExceptionFactoryInterface ? |
26 | - self::$userDefinedFactory->create($result) : |
|
27 | - $this->defaultException($result); |
|
26 | + self::$userDefinedFactory->create($result) : $this->defaultException($result); |
|
28 | 27 | } |
29 | 28 | |
30 | 29 | private function defaultException(Result $result): ValidationExceptionInterface |
31 | 30 | { |
32 | 31 | return |
33 | 32 | $this->exception instanceof ValidationExceptionInterface ? |
34 | - $this->exception : |
|
35 | - new ValidationException( |
|
33 | + $this->exception : new ValidationException( |
|
36 | 34 | $result->getErrors(), |
37 | 35 | is_string($this->exception) ? $this->exception : '' |
38 | 36 | ); |