| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class GuzzleAdapter extends AbstractAdapter |
||
| 9 | { |
||
| 10 | 25 | public function getClient(): Client |
|
| 11 | { |
||
| 12 | 25 | if (!$this->client) { |
|
| 13 | 1 | $this->setClient(new Client([ |
|
| 14 | 1 | 'base_uri' => sprintf('https://%s.highrisehq.com', $this->getSubdomain()), |
|
| 15 | 'headers' => [ |
||
| 16 | 1 | 'Content-Type' => 'application/xml', |
|
| 17 | 1 | 'User-Agent' => static::HEADER_DEFAULT_USER_AGENT, |
|
| 18 | ], |
||
| 19 | 1 | 'auth' => [$this->getToken(), $this->getPassword()] |
|
| 20 | ])); |
||
| 21 | } |
||
| 22 | 25 | return $this->client; |
|
| 23 | } |
||
| 24 | |||
| 25 | 24 | protected function send(string $method, string $uri, array $options = []) |
|
| 43 | 23 | } |
|
| 44 | } |
||
| 45 |