Conditions | 6 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public static function toTableRowsInput(array $response) |
||
18 | { |
||
19 | $rows = []; |
||
20 | foreach ($response as $key => $value) { |
||
21 | if (is_array($value)) { |
||
22 | $rows[] = [$key, count($value) ? http_build_query($value, '', ',') : '[]']; |
||
23 | } elseif (is_bool($value)) { |
||
24 | $rows[] = [$key, $value ? 'true' : 'false']; |
||
25 | } else { |
||
26 | $rows[] = [$key, strval($value)]; |
||
27 | } |
||
28 | } |
||
29 | return $rows; |
||
30 | } |
||
32 |