Passed
Push — main ( d87428...2f076f )
by Breno
01:43
created
src/ValidationSet.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     private SplObjectStorage $rules;
19 19
 
20
-    final public function __construct(?string $field = null, Validation|ValidationSet ...$rules)
20
+    final public function __construct(?string $field = null, Validation | ValidationSet ...$rules)
21 21
     {
22 22
         $this->rules = new SplObjectStorage;
23 23
         $this->field = $field;
@@ -29,24 +29,24 @@  discard block
 block discarded – undo
29 29
         return new self;
30 30
     }
31 31
 
32
-    public static function forField(string $field, Validation|ValidationSet ...$rules): self
32
+    public static function forField(string $field, Validation | ValidationSet ...$rules): self
33 33
     {
34 34
         return new self($field, ...$rules);
35 35
     }
36 36
 
37
-    public static function withRules(Validation|ValidationSet ...$rules): self
37
+    public static function withRules(Validation | ValidationSet ...$rules): self
38 38
     {
39 39
         return new self(null, ...$rules);
40 40
     }
41 41
 
42
-    public function add(Validation|ValidationSet ...$rules): self
42
+    public function add(Validation | ValidationSet ...$rules): self
43 43
     {
44 44
         $instance = clone $this;
45 45
         $instance->attachRules(...$rules);
46 46
         return $instance;
47 47
     }
48 48
 
49
-    private function attachRules(Validation|ValidationSet ...$rules): void
49
+    private function attachRules(Validation | ValidationSet ...$rules): void
50 50
     {
51 51
         foreach ($rules as $validationOrSet) {
52 52
             if ($validationOrSet instanceof Validation) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
     }
63 63
 
64
-    public function validate(mixed $input, array $context = []): ValidationResult|ValidationResultByField
64
+    public function validate(mixed $input, array $context = []): ValidationResult | ValidationResultByField
65 65
     {
66 66
         $violations = $empty = $this->newEmptyValidationResult();
67 67
         if (null === $input && $this->allowsNull()) {
Please login to merge, or discard this patch.