Conditions | 5 |
Paths | 5 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5.0342 |
Changes | 0 |
1 | <?php |
||
75 | 7 | protected function shouldBeCastToCollection(array $values): bool |
|
76 | { |
||
77 | 7 | if (empty($values)) { |
|
78 | 1 | return false; |
|
79 | } |
||
80 | |||
81 | 6 | foreach ($values as $key => $value) { |
|
82 | 6 | if (is_string($key)) { |
|
83 | return false; |
||
84 | } |
||
85 | |||
86 | 6 | if (! is_array($value)) { |
|
87 | 6 | return false; |
|
88 | } |
||
89 | } |
||
90 | |||
91 | 2 | return true; |
|
92 | } |
||
94 |