Passed
Push — master ( 9147e7...8b2482 )
by Alexey
02:30
created
src/Validator.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@
 block discarded – undo
55 55
     }
56 56
 
57 57
     protected function isIntValue($value){
58
-        if(is_bool($value)) return false;
58
+        if(is_bool($value)) {
59
+            return false;
60
+        }
59 61
         return  is_int($value) || preg_match('/^\d+$/',$value);
60 62
     }
61 63
 
Please login to merge, or discard this patch.
src/ValueObject.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
     public function __construct($value, $type = null)
23 23
     {
24 24
         $this->value = $value;
25
-        if(!in_array($type, $this->types())) throw new ValueObjectInvalidTypeException('Wrong type: '. $type);
25
+        if(!in_array($type, $this->types())) {
26
+            throw new ValueObjectInvalidTypeException('Wrong type: '. $type);
27
+        }
26 28
         $this->type = $type;
27 29
     }
28 30
 
Please login to merge, or discard this patch.
src/Validations/IntValidation.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
     }
24 24
 
25 25
     protected function isIntValue($value){
26
-        if(is_bool($value)) return false;
26
+        if(is_bool($value)) {
27
+            return false;
28
+        }
27 29
         return  is_int($value) || preg_match('/^\d+$/',$value);
28 30
     }
29 31
 }
30 32
\ No newline at end of file
Please login to merge, or discard this patch.
src/Validation.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
18 18
         $this->closure = $closure;
19 19
     }
20 20
     public function check($data){
21
-        if (! $data instanceof ValueObject) $data = ValueObject::get($data);
21
+        if (! $data instanceof ValueObject) {
22
+            $data = ValueObject::get($data);
23
+        }
22 24
         try {
23 25
             return call_user_func($this->closure,$data);
24 26
         } catch (\Exception $exception){
Please login to merge, or discard this patch.