@@ -27,8 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | return |
| 29 | 29 | $this->isValid($input, $context) ? |
| 30 | - ErrorReporting::success() : |
|
| 31 | - (new ErrorReporting)->addError($this->message, $this->getField(), $this); |
|
| 30 | + ErrorReporting::success() : (new ErrorReporting)->addError($this->message, $this->getField(), $this); |
|
| 32 | 31 | } |
| 33 | 32 | |
| 34 | 33 | private function className(): string |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | private function stopSign(Rule $rule, Result $result): int |
| 74 | 74 | { |
| 75 | - if (! $rule instanceof Stoppable) { |
|
| 75 | + if (!$rule instanceof Stoppable) { |
|
| 76 | 76 | return StopSign::DONT_STOP; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @param Rule|RuleSet ...$rules |
| 39 | 39 | * @return $this |
| 40 | 40 | */ |
| 41 | - public function field(string $field, Rule|RuleSet ...$rules): self |
|
| 41 | + public function field(string $field, Rule | RuleSet ...$rules): self |
|
| 42 | 42 | { |
| 43 | 43 | $ruleSet = $this->ruleSets[$field] ?? RuleSet::of($field); |
| 44 | 44 | $this->ruleSets[$field] = $ruleSet->add(...$rules); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $errorReporting = new ErrorReporting; |
| 51 | 51 | foreach ($this->ruleSets as $field => $fieldRuleSet) { |
| 52 | - if (! $this->shouldValidate($fieldRuleSet, $data)) { |
|
| 52 | + if (!$this->shouldValidate($fieldRuleSet, $data)) { |
|
| 53 | 53 | continue; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @return static |
| 115 | 115 | * @throws ReflectionException if the class does not exist |
| 116 | 116 | */ |
| 117 | - public static function fromProperties(string|object $objectOrClass, ?int $filter = null): self |
|
| 117 | + public static function fromProperties(string | object $objectOrClass, ?int $filter = null): self |
|
| 118 | 118 | { |
| 119 | 119 | $instance = new self; |
| 120 | 120 | $instance->ruleSets = RuleSetFactory::fromProperties($objectOrClass, $filter); |