Passed
Push — master ( 197741...dc38c3 )
by Valentin
04:51 queued 10s
created
src/Validation/src/Checker/TypeChecker.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@
 block discarded – undo
69 69
      */
70 70
     public function datetime($value): bool
71 71
     {
72
-        if (!is_scalar($value)) {
72
+        if (!is_scalar($value)){
73 73
             return false;
74 74
         }
75 75
 
76
-        if (is_numeric($value)) {
76
+        if (is_numeric($value)){
77 77
             return true;
78 78
         }
79 79
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,11 +69,13 @@
 block discarded – undo
69 69
      */
70 70
     public function datetime($value): bool
71 71
     {
72
-        if (!is_scalar($value)) {
72
+        if (!is_scalar($value))
73
+        {
73 74
             return false;
74 75
         }
75 76
 
76
-        if (is_numeric($value)) {
77
+        if (is_numeric($value))
78
+        {
77 79
             return true;
78 80
         }
79 81
 
Please login to merge, or discard this patch.
src/Validation/tests/Checkers/TypesTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     {
95 95
         $checker = new TypeChecker();
96 96
 
97
-        foreach (\DateTimeZone::listIdentifiers() as $identifier) {
97
+        foreach (\DateTimeZone::listIdentifiers() as $identifier){
98 98
             $this->assertTrue($checker->timezone($identifier));
99 99
             $this->assertFalse($checker->timezone(str_rot13($identifier)));
100 100
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@
 block discarded – undo
94 94
     {
95 95
         $checker = new TypeChecker();
96 96
 
97
-        foreach (\DateTimeZone::listIdentifiers() as $identifier) {
97
+        foreach (\DateTimeZone::listIdentifiers() as $identifier)
98
+        {
98 99
             $this->assertTrue($checker->timezone($identifier));
99 100
             $this->assertFalse($checker->timezone(str_rot13($identifier)));
100 101
         }
Please login to merge, or discard this patch.
src/Validation/src/Checker/ArrayChecker.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
 
20 20
     public function of($value, $checker): bool
21 21
     {
22
-        if (!is_array($value) || empty($value)) {
22
+        if (!is_array($value) || empty($value)){
23 23
             return false;
24 24
         }
25 25
 
26
-        foreach ($value as $item) {
27
-            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) {
26
+        foreach ($value as $item){
27
+            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()){
28 28
                 return false;
29 29
             }
30 30
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,12 +19,15 @@
 block discarded – undo
19 19
 
20 20
     public function of($value, $checker): bool
21 21
     {
22
-        if (!is_array($value) || empty($value)) {
22
+        if (!is_array($value) || empty($value))
23
+        {
23 24
             return false;
24 25
         }
25 26
 
26
-        foreach ($value as $item) {
27
-            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) {
27
+        foreach ($value as $item)
28
+        {
29
+            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid())
30
+            {
28 31
                 return false;
29 32
             }
30 33
         }
Please login to merge, or discard this patch.