Conditions | 3 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function createAuthUrl($scopes = '', $state = null) { |
||
18 | $addy = ''; |
||
19 | if ($this->client->isForceRelogin() === true) { |
||
20 | $addy .= '&force_verify=true'; |
||
21 | } |
||
22 | |||
23 | if ($state) |
||
24 | $addy .= '&state='.$state; |
||
25 | |||
26 | $url = sprintf('%s/oauth2/authorize/?response_type=code&client_id=%s&redirect_uri=%s&scope=%s%s', |
||
27 | $this->client->getApiUrl(), |
||
28 | $this->client->getClientId(), |
||
29 | $this->client->getRedirectUri(), |
||
30 | urlencode($scopes), |
||
31 | $addy |
||
32 | ); |
||
33 | return $url; |
||
34 | } |
||
35 | } |