| Conditions | 6 |
| Paths | 20 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 12.4072 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | 3 | public function applyResponse($response) |
|
| 10 | { |
||
| 11 | 3 | if (isset($response['response'])) { |
|
| 12 | if (isset($response['response']['error'])) { |
||
| 13 | $this->error = $response['response']['error']; |
||
| 14 | } |
||
| 15 | if (isset($response['response']['message_uuid'])) { |
||
| 16 | $this->uuid = $response['response']['message_uuid'][0]; |
||
| 17 | } |
||
| 18 | } |
||
| 19 | |||
| 20 | 3 | if (isset($response['available_phone_numbers'])) { |
|
| 21 | 3 | $this->number = $response['available_phone_numbers'][0]['phone_number']; |
|
| 22 | 3 | } |
|
| 23 | |||
| 24 | 3 | if (isset($response['status'])) { |
|
| 25 | $this->status = $response["status"]; |
||
| 26 | } |
||
| 27 | 3 | } |
|
| 28 | |||
| 34 |