Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.5 |
Changes | 0 |
1 | <?php |
||
46 | 1 | protected function createApiInstance() |
|
47 | { |
||
48 | 1 | $configToken = $this->getConfig('token'); |
|
49 | |||
50 | 1 | if ($configToken === null) |
|
51 | { |
||
52 | 1 | throw new InvalidArgumentException('API token has not been set in the config.'); |
|
53 | } |
||
54 | |||
55 | $token = new Token($configToken); |
||
56 | $this->api = new Api(); |
||
57 | $this->api->setToken($token); |
||
58 | } |
||
59 | |||
61 |