| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | protected function parseResponseBody($body){ |
||
| 48 | if(empty($body)){ |
||
| 49 | throw new \Exception("No response recieved"); |
||
| 50 | } |
||
| 51 | |||
| 52 | if(\is_string($body) ){ |
||
| 53 | $this->status = 'success'; |
||
|
|
|||
| 54 | $this->statusCode = '200'; |
||
| 55 | $this->shorturl = $url; |
||
|
1 ignored issue
–
show
|
|||
| 56 | return; |
||
| 57 | } |
||
| 58 | |||
| 59 | foreach((array)$body as $key => $value){ |
||
| 60 | $this->{$key} = $value; |
||
| 61 | } |
||
| 66 |