Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 | } |
||
45 |