Passed
Push — main ( 63305f...7cc982 )
by Breno
01:54
created
src/Exception/ValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Exception/Guard.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 
35 35
         $exception =
36 36
             $validationException instanceof ValidationExceptionInterface ?
37
-                $validationException :
38
-                new ValidationException();
37
+                $validationException : new ValidationException();
39 38
 
40 39
         foreach ($result->getErrors() as $error) {
41 40
             $exception->addError($error, $result->getField());
Please login to merge, or discard this patch.
src/RuleSet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
         return new self;
33 33
     }
34 34
 
35
-    public static function of(string $field, Rule|RuleSet ...$rules): self
35
+    public static function of(string $field, Rule | RuleSet ...$rules): self
36 36
     {
37 37
         return new self($field, ...$rules);
38 38
     }
39 39
 
40
-    public static function withRules(Rule|RuleSet ...$rules): self
40
+    public static function withRules(Rule | RuleSet ...$rules): self
41 41
     {
42 42
         return new self(null, ...$rules);
43 43
     }
Please login to merge, or discard this patch.
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.