Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ApiRequester extends AbstractRequester |
||
16 | { |
||
17 | /** @var HttpClient */ |
||
18 | private HttpClient $httpClient; |
||
19 | |||
20 | /** |
||
21 | * ApiRequester constructor. |
||
22 | * @throws RequestException |
||
23 | * @throws MessageException |
||
24 | */ |
||
25 | public function __construct() |
||
26 | { |
||
27 | $this->httpClient = HttpClient::getInstance() |
||
28 | ->withNoFollowRedirect(); |
||
29 | |||
30 | parent::__construct(); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param RequestInterface $request |
||
35 | * @return ResponseInterface |
||
36 | * @throws NetworkException |
||
37 | * @throws RequestException |
||
38 | */ |
||
39 | protected function handleRequest(RequestInterface $request): ResponseInterface |
||
43 | } |
||
44 | } |
||
45 |