Passed
Push — main ( 63305f...7cc982 )
by Breno
01:54
created
src/Validator.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.