Passed
Push — main ( 75c971...6afe0c )
by Breno
01:59
created
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/Exception/ParseErrorsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 $error['field'] ?? '_error',
34 34
                 $error['message'],
35 35
                 $error['type'] ?? ''
36
-            ) . PHP_EOL;
36
+            ).PHP_EOL;
37 37
         }
38 38
 
39 39
         return $errors;
Please login to merge, or discard this patch.
src/AbstractRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         return
36 36
             $this->isValid($input, $context) ?
37
-                ErrorReporting::success() :
38
-                (new ErrorReporting)->addError($this->message(), $this->getField(), $this);
37
+                ErrorReporting::success() : (new ErrorReporting)->addError($this->message(), $this->getField(), $this);
39 38
     }
40 39
 
41 40
     protected function className(): string
Please login to merge, or discard this patch.
src/Translation/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     private static TranslatorInterface $default;
9 9
 
10
-    public static function setDefault(TranslatorInterface|callable $translator, bool $compose = true): void
10
+    public static function setDefault(TranslatorInterface | callable $translator, bool $compose = true): void
11 11
     {
12 12
         if ($translator instanceof TranslatorInterface) {
13 13
             self::$default = $translator;
Please login to merge, or discard this patch.
src/PriorityTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public static function sortByPriority(array &$haystack): void
23 23
     {
24
-        uasort($haystack, function ($a, $b) {
24
+        uasort($haystack, function($a, $b) {
25 25
             $prorityOfA = $a instanceof Priority ? $a->getPriority() : 0;
26 26
             $prorityOfB = $b instanceof Priority ? $b->getPriority() : 0;
27 27
 
Please login to merge, or discard this patch.
src/Rules/UseRuleSet.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
     use BelongsToFieldTrait, PriorityTrait;
19 19
 
20 20
     public function __construct(
21
-        private object|string $objectOrClass,
21
+        private object | string $objectOrClass,
22 22
         private string $property,
23 23
         int $priority = 0
24 24
     ) {
Please login to merge, or discard this patch.