Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
55 | 5 | public function isAssoc(array &$array): bool |
|
56 | { |
||
57 | // Keys of the array |
||
58 | 5 | $keys = array_keys($array); |
|
59 | |||
60 | // If the array keys of the keys match the keys, then the array must |
||
61 | // not be associative (e.g. the keys array looked like {0:0, 1:1...}). |
||
62 | |||
63 | 5 | return array_keys($keys) !== $keys; |
|
64 | } |
||
66 |