Passed
Push — main ( c6b4b7...2c4672 )
by Breno
01:50
created
src/Validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         return $this->ruleSets[] = (new ValidationSet)->setField($field);
27 27
     }
28 28
 
29
-    public function field(string $field, Validation|ValidationSet ...$rules): self
29
+    public function field(string $field, Validation | ValidationSet ...$rules): self
30 30
     {
31 31
         $ruleset = $this->ruleSet($field);
32 32
         foreach ($rules as $rule) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @return static
81 81
      * @throws ReflectionException if the class does not exist
82 82
      */
83
-    public static function fromProperties(string|object $objectOrClass, ?int $filter = null): self
83
+    public static function fromProperties(string | object $objectOrClass, ?int $filter = null): self
84 84
     {
85 85
         $instance = new self;
86 86
         $instance->ruleSets = ValidationSet::fromProperties($objectOrClass, $filter);
Please login to merge, or discard this patch.
src/ValidationSet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         return $this;
32 32
     }
33 33
 
34
-    public function validate($input, array $context = []): ValidationResult|ValidationResultByField
34
+    public function validate($input, array $context = []): ValidationResult | ValidationResultByField
35 35
     {
36 36
         $violations = $this->newEmptyValidationResult();
37 37
         foreach ($this->rules as $constraint) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @return array
73 73
      * @throws ReflectionException if the class does not exist
74 74
      */
75
-    public static function fromProperties(string|object $objectOrClass, ?int $filter = null): array
75
+    public static function fromProperties(string | object $objectOrClass, ?int $filter = null): array
76 76
     {
77 77
         $ruleSets = [];
78 78
         foreach ((new ReflectionClass($objectOrClass))->getProperties($filter) as $property) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @return static
89 89
      * @throws ReflectionException if the class or property does not exist.
90 90
      */
91
-    public static function fromProperty(string|object $objectOrClass, string $property): self
91
+    public static function fromProperty(string | object $objectOrClass, string $property): self
92 92
     {
93 93
         return self::fromReflectionProperty(new ReflectionProperty($objectOrClass, $property));
94 94
     }
Please login to merge, or discard this patch.