Passed
Push — main ( 5a7dc0...59e738 )
by Breno
01:46
created
src/AbstractRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/RuleSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Validator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $errorReporting = new ErrorReporting;
51 51
         foreach ($this->ruleSets as $field => $fieldRuleSet) {
52 52
             $fieldRuleSet = $fieldRuleSet->setField($field);
53
-            if (! $this->shouldValidate($fieldRuleSet, $data)) {
53
+            if (!$this->shouldValidate($fieldRuleSet, $data)) {
54 54
                 continue;
55 55
             }
56 56
             
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @return static
116 116
      * @throws ReflectionException if the class does not exist
117 117
      */
118
-    public static function fromProperties(string|object $objectOrClass, ?int $filter = null): self
118
+    public static function fromProperties(string | object $objectOrClass, ?int $filter = null): self
119 119
     {
120 120
         $instance = new self;
121 121
         $instance->ruleSets = RuleSetFactory::fromProperties($objectOrClass, $filter);
Please login to merge, or discard this patch.
src/Rules/CopyFrom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 #[Attribute(Attribute::TARGET_PROPERTY)]
12 12
 class CopyFrom implements Rule
13 13
 {
14
-    public function __construct(private object|string $objectOrClass, private string $property)
14
+    public function __construct(private object | string $objectOrClass, private string $property)
15 15
     {
16 16
     }
17 17
 
Please login to merge, or discard this patch.