| Conditions | 6 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 46 | private function formatParams($singleCall) |
||
| 47 | 1 | { |
|
| 48 | if($singleCall['method'] != 'GET') |
||
| 49 | 1 | { |
|
| 50 | foreach($singleCall['request_headers'] as $key => $value) |
||
| 51 | 1 | { |
|
| 52 | if($key == 'Content-Type' && (is_array($value) ? $value[0] : $value) == 'application/json') |
||
| 53 | { |
||
| 54 | return sprintf(" --data '%s'", json_encode($singleCall['params'])); |
||
| 55 | 1 | } |
|
| 56 | } |
||
| 57 | |||
| 58 | return sprintf(" --data '%s'", http_build_query($singleCall['params'])); |
||
| 59 | 1 | } |
|
| 60 | else |
||
| 61 | { |
||
| 62 | return ''; |
||
| 63 | } |
||
| 66 |