Passed
Push — main ( 6abb46...867243 )
by Breno
01:45
created
src/ValidationSet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         return $this;
51 51
     }
52 52
 
53
-    public function validate(mixed $input, array $context = []): ValidationResult|ValidationResultByField
53
+    public function validate(mixed $input, array $context = []): ValidationResult | ValidationResultByField
54 54
     {
55 55
         $violations = $this->newEmptyValidationResult();
56 56
         if (null === $input && $this->allowsNull()) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * @return ValidationSet[]
152 152
      * @throws ReflectionException if the class does not exist
153 153
      */
154
-    public static function fromProperties(string|object $objectOrClass, ?int $filter = null): array
154
+    public static function fromProperties(string | object $objectOrClass, ?int $filter = null): array
155 155
     {
156 156
         $ruleSets = [];
157 157
         foreach ((new ReflectionClass($objectOrClass))->getProperties($filter) as $property) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @return ValidationSet[]
168 168
      * @throws ReflectionException
169 169
      */
170
-    public static function fromMethods(string|object $objectOrClass, ?int $filter = null): array
170
+    public static function fromMethods(string | object $objectOrClass, ?int $filter = null): array
171 171
     {
172 172
         $ruleSets = [];
173 173
         foreach ((new ReflectionClass($objectOrClass))->getMethods($filter) as $method) {
@@ -183,12 +183,12 @@  discard block
 block discarded – undo
183 183
      * @return static
184 184
      * @throws ReflectionException if the class or property does not exist.
185 185
      */
186
-    public static function fromProperty(string|object $objectOrClass, string $property): self
186
+    public static function fromProperty(string | object $objectOrClass, string $property): self
187 187
     {
188 188
         return self::fromReflectionProperty(new ReflectionProperty($objectOrClass, $property));
189 189
     }
190 190
 
191
-    public static function fromMethod(string|object $objectOrClass, string $method): self
191
+    public static function fromMethod(string | object $objectOrClass, string $method): self
192 192
     {
193 193
         return self::fromReflectionMethod(new ReflectionMethod($objectOrClass, $method));
194 194
     }
Please login to merge, or discard this patch.
src/Rules/Brazilian/DigitoVerificador.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $number = substr($stringInput, 0, -1);
33 33
         $digit = (int) substr($stringInput, -1);
34 34
         return
35
-            $digit === match ($this->algorithm) {
35
+            $digit === match($this->algorithm) {
36 36
                 self::MOD11 => self::mod11($number),
37 37
                 self::MOD10 => self::mod10($number),
38 38
                 default => throw new InvalidArgumentException('Algoritmo de cálculo de dígito inválido')
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $sum += $number * $factor[$i++ % $size];
50 50
         }
51 51
 
52
-        return 11 - (($sum * 10 ) % 11);
52
+        return 11 - (($sum * 10) % 11);
53 53
     }
54 54
 
55 55
     public static function mod10($input): int
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
         $digits = substr($document, -2);
74 74
 
75 75
         $digit1 = DigitoVerificador::mod11($number);
76
-        $digit2 = DigitoVerificador::mod11($number . $digit1);
76
+        $digit2 = DigitoVerificador::mod11($number.$digit1);
77 77
 
78
-        return $digits === ($digit1 . $digit2);
78
+        return $digits === ($digit1.$digit2);
79 79
     }
80 80
 }
Please login to merge, or discard this patch.