| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 2 | public function sendRequest(RequestInterface $wiziqRequest) |
|
| 40 | { |
||
| 41 | 2 | $url = sprintf('%s?method=%s', $this->endpointUrl, $wiziqRequest->getMethod()); |
|
| 42 | 2 | $params = $this->auth->preparePayload($wiziqRequest->getMethod(), $wiziqRequest->getParams()); |
|
| 43 | |||
| 44 | 2 | $rawResponse = $this->client->getResponse($url, $params); |
|
| 45 | 2 | $xmlObject = simplexml_load_string($rawResponse); |
|
| 46 | 2 | $response = new Response($xmlObject); |
|
| 47 | |||
| 48 | 2 | if (!$response->isSuccess()) { |
|
| 49 | 1 | throw CallException::from($response); |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | return $response->getResponse(); |
|
| 53 | } |
||
| 54 | } |
||
| 55 |