Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0417 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
70 | 3 | private function generateToken() |
|
71 | { |
||
72 | 3 | $username = $this->client->getUsername(); |
|
73 | 3 | $password = $this->client->getUserPassword(); |
|
74 | |||
75 | 3 | if ($username === null || $password === null) { |
|
76 | throw new \Exception('Cannot refresh token.'); |
||
77 | } |
||
78 | |||
79 | 3 | return $this->client->identityService()->getToken()->access->token->id; |
|
80 | } |
||
81 | |||
105 |