| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Helper |
||
| 14 | { |
||
| 15 | protected LoggerInterface $logger; |
||
| 16 | protected CurlClient $curlClient; |
||
| 17 | |||
| 18 | public function __construct(LoggerInterface $logger, string $jwt) |
||
| 19 | { |
||
| 20 | $this->logger = $logger; |
||
| 21 | $this->curlClient = new CurlClient($this->logger); |
||
| 22 | $this->curlClient->setRequestHeader('Accept', Document::CONTENT_TYPE); |
||
| 23 | $this->curlClient->setRequestHeader('Authorization', \sprintf('Bearer %s', $jwt)); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param array<string,mixed>|string $requestData |
||
| 28 | */ |
||
| 29 | public function getResponse(string $url, string $method, $requestData): ResponseInterface |
||
| 44 | } |
||
| 45 | } |
||
| 46 |