@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @param Rule|RuleSet ...$rules |
35 | 35 | * @return $this |
36 | 36 | */ |
37 | - public function field(string $field, Rule|RuleSet ...$rules): self |
|
37 | + public function field(string $field, Rule | RuleSet ...$rules): self |
|
38 | 38 | { |
39 | 39 | $ruleSet = $this->ruleSets[$field] ?? RuleSet::of($field); |
40 | 40 | $this->ruleSets[$field] = $ruleSet->add(...$rules); |
@@ -118,8 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $exception = |
120 | 120 | $validationException instanceof ValidationExceptionInterface ? |
121 | - $validationException : |
|
122 | - new ValidationException(); |
|
121 | + $validationException : new ValidationException(); |
|
123 | 122 | |
124 | 123 | foreach ($resultSet->getErrors() as $fieldOrIndex => $error) { |
125 | 124 | if (!is_array($error)) { |
@@ -141,7 +140,7 @@ discard block |
||
141 | 140 | * @return static |
142 | 141 | * @throws ReflectionException if the class does not exist |
143 | 142 | */ |
144 | - public static function fromProperties(string|object $objectOrClass, ?int $filter = null): self |
|
143 | + public static function fromProperties(string | object $objectOrClass, ?int $filter = null): self |
|
145 | 144 | { |
146 | 145 | $instance = new self; |
147 | 146 | $instance->ruleSets = RuleSetFactory::fromProperties($objectOrClass, $filter); |