Passed
Push — main ( 52de70...4bac34 )
by Breno
02:11
created
src/RuleChain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
  */
17 17
 trait RuleChain
18 18
 {
19
-    abstract public function add(Rule|RuleSet ...$rules): static;
19
+    abstract public function add(Rule | RuleSet ...$rules): static;
20 20
 
21 21
     public function __call($name, $arguments): static
22 22
     {
23
-        $namespace = __NAMESPACE__ . '\\Rules';
23
+        $namespace = __NAMESPACE__.'\\Rules';
24 24
         $class = sprintf("%s\%s", $namespace, ucfirst($name));
25 25
         if (!class_exists($class)) {
26 26
             throw new RuntimeException(sprintf('Rule not found: (%s).', $name));
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
@@ -37,8 +37,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
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/RuleSet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/MaybeBelongsToField.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,11 +42,10 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.