Passed
Push — master ( c2e9f1...7cd9b3 )
by Dedipyaman
01:41
created
src/Rule/Primitive/Numeric.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,9 +23,10 @@
 block discarded – undo
23 23
 {
24 24
     public function validate($data): Result
25 25
     {
26
-        if (is_numeric($data))
27
-            return new Success();
28
-        else
29
-            return new Failure(new RuleError(RuleErrorCode::NOT_NUMERIC, 'Input value is not numeric'));
26
+        if (is_numeric($data)) {
27
+                    return new Success();
28
+        } else {
29
+                    return new Failure(new RuleError(RuleErrorCode::NOT_NUMERIC, 'Input value is not numeric'));
30
+        }
30 31
     }
31 32
 }
32 33
\ No newline at end of file
Please login to merge, or discard this patch.
src/Rule/Chartype/FloatNumber.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
     {
28 28
         $numericResult = (new Numeric())->validate($value);
29 29
 
30
-        if (!$numericResult->isValid())
31
-            return new $numericResult;
30
+        if (!$numericResult->isValid()) {
31
+                    return new $numericResult;
32
+        }
32 33
 
33 34
         if (filter_var(str_replace($this->allowedSpecialChars, '', $value), FILTER_VALIDATE_FLOAT) !== false) {
34 35
             return new Success();
Please login to merge, or discard this patch.
src/Rule/Chartype/IntegerNumber.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
     {
28 28
         $numericResult = (new Numeric())->validate($value);
29 29
 
30
-        if (!$numericResult->isValid())
31
-            return new $numericResult;
30
+        if (!$numericResult->isValid()) {
31
+                    return new $numericResult;
32
+        }
32 33
 
33 34
         if (filter_var(str_replace($this->allowedSpecialChars, '', $value), FILTER_VALIDATE_INT) !== false) {
34 35
             return new Success();
Please login to merge, or discard this patch.