| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function postRequestInvoice(string $uri, string $body, array $headers = []): ?array |
||
| 13 | { |
||
| 14 | $response = HttpClient::create() |
||
| 15 | ->request('POST', $uri, [ |
||
| 16 | 'headers' => $headers, |
||
| 17 | 'body' => $body, |
||
| 18 | ]); |
||
| 19 | |||
| 20 | return json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR); |
||
| 21 | } |
||
| 23 |