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