@@ -176,8 +176,9 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | // Adding the token access type |
| 179 | - if ($this->accessTokenType != null && !array_key_exists('token_access_type', $params)) |
|
| 180 | - $params['token_access_type'] = $this->accessTokenType; |
|
| 179 | + if ($this->accessTokenType != null && !array_key_exists('token_access_type', $params)) { |
|
| 180 | + $params['token_access_type'] = $this->accessTokenType; |
|
| 181 | + } |
|
| 181 | 182 | |
| 182 | 183 | //Get OAuth2 Authorization URL |
| 183 | 184 | return $this->getOAuth2Client()->getAuthorizationUrl($redirectUri, $state, $params); |
@@ -295,8 +296,9 @@ discard block |
||
| 295 | 296 | * @param $tokenType string |
| 296 | 297 | */ |
| 297 | 298 | public function setAccessTokenType($tokenType = self::TOKEN_ACCESS_TYPE_ONLINE) { |
| 298 | - if ($tokenType != self::TOKEN_ACCESS_TYPE_ONLINE && $tokenType != self::TOKEN_ACCESS_TYPE_OFFLINE) |
|
| 299 | - throw new \InvalidArgumentException("TokenType parameter must be either DropboxAuthHelper::TOKEN_ACCESS_TYPE_ONLINE or DropboxAuthHelper::TOKEN_ACCESS_TYPE_OFFLINE"); |
|
| 299 | + if ($tokenType != self::TOKEN_ACCESS_TYPE_ONLINE && $tokenType != self::TOKEN_ACCESS_TYPE_OFFLINE) { |
|
| 300 | + throw new \InvalidArgumentException("TokenType parameter must be either DropboxAuthHelper::TOKEN_ACCESS_TYPE_ONLINE or DropboxAuthHelper::TOKEN_ACCESS_TYPE_OFFLINE"); |
|
| 301 | + } |
|
| 300 | 302 | |
| 301 | 303 | $this->accessTokenType = $tokenType; |
| 302 | 304 | } |
@@ -141,8 +141,7 @@ |
||
| 141 | 141 | 'client_id' => $this->getApp()->getClientId(), |
| 142 | 142 | 'client_secret' => $this->getApp()->getClientSecret() |
| 143 | 143 | ]; |
| 144 | - } |
|
| 145 | - else |
|
| 144 | + } else |
|
| 146 | 145 | { |
| 147 | 146 | //Request Params |
| 148 | 147 | $params = [ |