@@ -37,8 +37,7 @@ |
||
37 | 37 | |
38 | 38 | $exception = |
39 | 39 | $validationException instanceof ValidationExceptionInterface ? |
40 | - $validationException : |
|
41 | - new ValidationException(); |
|
40 | + $validationException : new ValidationException(); |
|
42 | 41 | |
43 | 42 | $field = $result instanceof ResultByField ? $result->getField() : null; |
44 | 43 | foreach ($result->getErrors() as $error) { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
21 | - return $this->getMessage() . ":" . PHP_EOL . implode(PHP_EOL, $messages); |
|
21 | + return $this->getMessage().":".PHP_EOL.implode(PHP_EOL, $messages); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * @throws Exception\ValidationExceptionInterface |
41 | 41 | */ |
42 | - public static function forField(string $field, Rule|RuleSet ...$rules): self |
|
42 | + public static function forField(string $field, Rule | RuleSet ...$rules): self |
|
43 | 43 | { |
44 | 44 | return new self($field, ...$rules); |
45 | 45 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * @throws Exception\ValidationExceptionInterface |
49 | 49 | */ |
50 | - public static function withRules(Rule|RuleSet ...$rules): self |
|
50 | + public static function withRules(Rule | RuleSet ...$rules): self |
|
51 | 51 | { |
52 | 52 | return new self(null, ...$rules); |
53 | 53 | } |
@@ -42,11 +42,10 @@ |
||
42 | 42 | /** |
43 | 43 | * @throws ValidationExceptionInterface |
44 | 44 | */ |
45 | - private function newEmptyValidationResult(): ValidationResult|ValidationResultByField |
|
45 | + private function newEmptyValidationResult(): ValidationResult | ValidationResultByField |
|
46 | 46 | { |
47 | 47 | return |
48 | 48 | $this->belongsToField() ? |
49 | - new ValidationResultByField($this->getField()) : |
|
50 | - ValidationResult::everythingIsOk(); |
|
49 | + new ValidationResultByField($this->getField()) : ValidationResult::everythingIsOk(); |
|
51 | 50 | } |
52 | 51 | } |