| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | 38 | protected function convertIdInArrayKeys(array $data): array |
|
| 50 | { |
||
| 51 | 38 | foreach ($data as $key => $value) { |
|
| 52 | 38 | if (!is_string($key)) { |
|
| 53 | continue; |
||
| 54 | } |
||
| 55 | 38 | $newKey = $this->convertIdInString($key); |
|
| 56 | |||
| 57 | 38 | $data[$newKey] = $value; |
|
| 58 | 38 | if ($key !== $newKey) { |
|
| 59 | 21 | unset($data[$key]); |
|
| 60 | } |
||
| 61 | } |
||
| 62 | |||
| 63 | 38 | return $data; |
|
| 64 | } |
||
| 66 |