Conditions | 7 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 7 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | 225 | public function convertIdToKey(mixed $data): mixed |
|
10 | { |
||
11 | 225 | if (is_array($data) && array_is_list($data)) { |
|
12 | 4 | foreach($data as $key => $value) { |
|
13 | 4 | $data[$key] = $this->convertIdInString($value); |
|
14 | } |
||
15 | 4 | return $data; |
|
16 | } |
||
17 | |||
18 | 225 | if (!is_array($data) && !is_string($data)) { |
|
19 | 1 | return $data; |
|
20 | } |
||
21 | |||
22 | 225 | if (is_string($data)) { |
|
23 | 223 | return $this->convertIdInString($data); |
|
24 | } |
||
25 | |||
26 | 38 | return $this->convertIdInArrayKeys($data); |
|
27 | } |
||
66 |