| Conditions | 2 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function post($url, SimpleXMLElement $body) |
||
| 31 | { |
||
| 32 | try { |
||
| 33 | 2 | $response = $this->client->request( |
|
| 34 | 'POST', |
||
| 35 | 2 | $url, |
|
| 36 | 1 | [ |
|
| 37 | 'headers' => ['Content-Type' => 'application/xml; charset=UTF-8'], |
||
| 38 | 'body' => $body->asXML(), |
||
| 39 | 1 | 'verify' => false |
|
| 40 | ] |
||
| 41 | ); |
||
| 42 | |||
| 43 | return new SimpleXMLElement($response->getBody()); |
||
| 44 | } catch (RequestException $e) { |
||
| 45 | throw new PagSeguroException($e->getMessage()); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | 1 | ||
| 64 |