Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | function array_search_key_recursive(array &$array, array $keyList, bool $strict = true): int |
||
24 | { |
||
25 | foreach ($array as $key => $element) { |
||
26 | if (in_array($key, $keyList, $strict)) { |
||
27 | return true; |
||
|
|||
28 | } |
||
29 | elseif (is_array($element)) { |
||
30 | return array_search_key_recursive($array[$key], $keyList, $strict); |
||
31 | } |
||
32 | } |
||
33 | return false; |
||
34 | } |
||
37 |