| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function respond($status, $body, $headers = []) |
||
| 56 | { |
||
| 57 | if (empty($headers)) { |
||
| 58 | // this is required to represent empty header set as map and not as array |
||
| 59 | $headers = new \stdClass(); |
||
| 60 | } |
||
| 61 | |||
| 62 | $this->getWorker()->send( |
||
| 63 | $body, |
||
| 64 | json_encode(['status' => $status, 'headers' => $headers]) |
||
| 65 | ); |
||
| 66 | } |
||
| 67 | } |
||
| 68 |