| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 8 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 30 | public function respond($response, $status, $headers, $options) |
||
| 31 | { |
||
| 32 | switch ($this->getRequestFormat()) { |
||
| 33 | case 'html' : |
||
| 34 | case 'text/html' : |
||
| 35 | return Response::make($response, $status, $headers, $options) |
||
| 36 | ->header('Content-Type', 'text/html'); |
||
| 37 | default : |
||
| 38 | // whether 'Content-Type' is NULL or equal to anything such as 'application/json' response will be JSON |
||
| 39 | return Response::json($response, $status, $headers, $options); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 53 |