Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | protected function canonicalize(array $input, $keyPrefix = '') |
||
35 | { |
||
36 | $resource = []; |
||
37 | |||
38 | foreach ($input as $key => $value) { |
||
39 | |||
40 | $key = $keyPrefix ? $keyPrefix . '.' . $key : $key; |
||
41 | |||
42 | $resource[] = is_array($value) |
||
43 | ? $this->canonicalize($value, $key) |
||
44 | : $key . '=' . $value; |
||
45 | } |
||
46 | |||
47 | return implode('&', $resource); |
||
48 | } |
||
49 | } |