Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 11 | public function execute($key, array $array): bool |
|
18 | { |
||
19 | 11 | $keys = $this->splitDotNotatedKeyToArray($key); |
|
20 | |||
21 | 11 | while (\count($keys) > 1) { |
|
22 | 6 | $key = \array_shift($keys); |
|
23 | |||
24 | 6 | if ($this->keyIsSetAndIsArray($array, $key)) { |
|
25 | 5 | $array = &$array[$key]; |
|
26 | } |
||
27 | } |
||
28 | |||
29 | 11 | $key = \array_shift($keys); |
|
30 | |||
31 | 11 | return $this->keyIsSetAndExists($array, $key); |
|
32 | } |
||
44 |