| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class HttpResponse extends Message |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | public function newData() |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Get the instance as an array. |
||
| 22 | * |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | public function toArray() |
||
| 31 | ]; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param array $data |
||
| 36 | * |
||
| 37 | * @return self |
||
| 38 | */ |
||
| 39 | public function fromArray($data) |
||
| 40 | { |
||
| 41 | return $this->setData(new Response($data['status_code'], $data['headers'], $data['body'])); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function __toString() |
||
| 50 | } |
||
| 51 | } |
||
| 52 |