| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function serialize(array $data): string |
||
| 12 | { |
||
| 13 | $output = ''; |
||
| 14 | |||
| 15 | foreach ($data as $key => $value) { |
||
| 16 | if (is_array($value)) { |
||
| 17 | $key = $key . '[]'; |
||
| 18 | |||
| 19 | foreach ($value as $v) { |
||
| 20 | $output .= $key . '=' . urlencode($v) . '&'; |
||
| 21 | } |
||
| 22 | } else { |
||
| 23 | $output .= $key . '=' . urlencode($value) . '&'; |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | return rtrim($output, '&'); |
||
| 28 | } |
||
| 48 |