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 |
||
46 | 27 | public function __construct(string $key, array $config = []) |
|
47 | { |
||
48 | 27 | if (empty($key)) { |
|
49 | 3 | throw new MissingAPIKeyException(); |
|
50 | } |
||
51 | |||
52 | 24 | $this->apiKey = $key; |
|
53 | $baseConfig = [ |
||
54 | 24 | 'base_uri' => self::BASE_URI, |
|
55 | 24 | RequestOptions::TIMEOUT => self::TIMEOUT |
|
56 | ]; |
||
57 | 24 | parent::__construct(array_merge($baseConfig, $config)); |
|
58 | 24 | $this->initEndpoints(); |
|
59 | 24 | } |
|
78 |