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 |
||
65 | 8 | public function isAssoc(array &$array): bool |
|
66 | { |
||
67 | // Keys of the array |
||
68 | 8 | $keys = array_keys($array); |
|
69 | |||
70 | // If the array keys of the keys match the keys, then the array must |
||
71 | // not be associative (e.g. the keys array looked like {0:0, 1:1...}). |
||
72 | |||
73 | 8 | return array_keys($keys) !== $keys; |
|
74 | } |
||
76 |