Passed
Push — master ( 05c834...72ff63 )
by Kirill
05:19 queued 11s
created
src/Validation/src/Checker/ArrayChecker.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function of($value, $checker): bool
31 31
     {
32
-        if (!is_array($value) || empty($value)) {
32
+        if (!is_array($value) || empty($value)){
33 33
             return false;
34 34
         }
35 35
 
36
-        foreach ($value as $item) {
37
-            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) {
36
+        foreach ($value as $item){
37
+            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()){
38 38
                 return false;
39 39
             }
40 40
         }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function count($value, int $length): bool
46 46
     {
47
-        if (!is_array($value) && !$value instanceof \Countable) {
47
+        if (!is_array($value) && !$value instanceof \Countable){
48 48
             return false;
49 49
         }
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function shorter($value, int $length): bool
55 55
     {
56
-        if (!is_array($value) && !$value instanceof \Countable) {
56
+        if (!is_array($value) && !$value instanceof \Countable){
57 57
             return false;
58 58
         }
59 59
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function longer($value, int $length): bool
64 64
     {
65
-        if (!is_array($value) && !$value instanceof \Countable) {
65
+        if (!is_array($value) && !$value instanceof \Countable){
66 66
             return false;
67 67
         }
68 68
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function range($value, int $min, int $max): bool
73 73
     {
74
-        if (!is_array($value) && !$value instanceof \Countable) {
74
+        if (!is_array($value) && !$value instanceof \Countable){
75 75
             return false;
76 76
         }
77 77
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,12 +29,15 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function of($value, $checker): bool
31 31
     {
32
-        if (!is_array($value) || empty($value)) {
32
+        if (!is_array($value) || empty($value))
33
+        {
33 34
             return false;
34 35
         }
35 36
 
36
-        foreach ($value as $item) {
37
-            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) {
37
+        foreach ($value as $item)
38
+        {
39
+            if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid())
40
+            {
38 41
                 return false;
39 42
             }
40 43
         }
@@ -44,7 +47,8 @@  discard block
 block discarded – undo
44 47
 
45 48
     public function count($value, int $length): bool
46 49
     {
47
-        if (!is_array($value) && !$value instanceof \Countable) {
50
+        if (!is_array($value) && !$value instanceof \Countable)
51
+        {
48 52
             return false;
49 53
         }
50 54
 
@@ -53,7 +57,8 @@  discard block
 block discarded – undo
53 57
 
54 58
     public function shorter($value, int $length): bool
55 59
     {
56
-        if (!is_array($value) && !$value instanceof \Countable) {
60
+        if (!is_array($value) && !$value instanceof \Countable)
61
+        {
57 62
             return false;
58 63
         }
59 64
 
@@ -62,7 +67,8 @@  discard block
 block discarded – undo
62 67
 
63 68
     public function longer($value, int $length): bool
64 69
     {
65
-        if (!is_array($value) && !$value instanceof \Countable) {
70
+        if (!is_array($value) && !$value instanceof \Countable)
71
+        {
66 72
             return false;
67 73
         }
68 74
 
@@ -71,7 +77,8 @@  discard block
 block discarded – undo
71 77
 
72 78
     public function range($value, int $min, int $max): bool
73 79
     {
74
-        if (!is_array($value) && !$value instanceof \Countable) {
80
+        if (!is_array($value) && !$value instanceof \Countable)
81
+        {
75 82
             return false;
76 83
         }
77 84
 
Please login to merge, or discard this patch.
src/Validation/tests/Checkers/ArrayTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
     private function createCountable(int $count): \Countable
81 81
     {
82
-        return new class($count) implements \Countable {
82
+        return new class($count) implements \Countable{
83 83
             private $count;
84 84
 
85 85
             public function __construct(int $count)
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,8 @@
 block discarded – undo
79 79
 
80 80
     private function createCountable(int $count): \Countable
81 81
     {
82
-        return new class($count) implements \Countable {
82
+        return new class($count) implements \Countable
83
+        {
83 84
             private $count;
84 85
 
85 86
             public function __construct(int $count)
Please login to merge, or discard this patch.