| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 2 | ||
| 34 | try { |
||
| 35 | 2 | $response = $this->client->post($url, ['headers' => ['Content-Type' => 'application/xml; charset=UTF-8'], 'body' => $body->asXML(), 'verify' => false]); |
|
| 36 | 1 | } catch (RequestException $e) { |
|
| 37 | throw PagSeguroException::create($e->getResponse()); |
||
|
|
|||
| 38 | } |
||
| 39 | 1 | ||
| 40 | return new SimpleXMLElement((string) $response->getBody()); |
||
| 41 | } |
||
| 58 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: