| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 22 | protected function convertIdInArrayKeys(array $data): array |
|
| 39 | { |
||
| 40 | 22 | foreach ($data as $key => $value) { |
|
| 41 | 22 | if (! is_string($key)) { |
|
| 42 | continue; |
||
| 43 | } |
||
| 44 | 22 | $newKey = $this->convertIdInString($key); |
|
| 45 | 22 | $data[$newKey] = $value; |
|
| 46 | 22 | if ($key !== $newKey) { |
|
| 47 | 17 | unset($data[$key]); |
|
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | 22 | return $data; |
|
| 52 | } |
||
| 54 |