Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function __construct(string $key, array $config = []) |
||
44 | { |
||
45 | if (empty($key)) { |
||
46 | 27 | throw new MissingAPIKeyException(); |
|
47 | } |
||
48 | 27 | ||
49 | 3 | $this->apiKey = $key; |
|
50 | $baseConfig = [ |
||
51 | 'base_uri' => self::BASE_URI, |
||
52 | 24 | RequestOptions::TIMEOUT => self::TIMEOUT, |
|
53 | ]; |
||
54 | 24 | parent::__construct(array_merge($baseConfig, $config)); |
|
55 | 24 | $this->initEndpoints(); |
|
56 | } |
||
72 |