1
0
Fork 0

Simplify the if statement.

pull/5363/head
Stefan Grootscholten 2016-06-08 22:13:49 +02:00
parent 42f4d344a4
commit 1241e3e83c
1 changed files with 4 additions and 4 deletions

View File

@ -695,10 +695,10 @@ class RemoteFilesystem
if ($auth['password'] === 'oauth2') { if ($auth['password'] === 'oauth2') {
$headers[] = 'Authorization: Bearer '.$auth['username']; $headers[] = 'Authorization: Bearer '.$auth['username'];
} }
} elseif ('bitbucket.org' === $originUrl && $this->fileUrl !== Bitbucket::OAUTH2_ACCESS_TOKEN_URL) { } elseif ('bitbucket.org' === $originUrl
if ('x-token-auth' === $auth['username']) { && $this->fileUrl !== Bitbucket::OAUTH2_ACCESS_TOKEN_URL && 'x-token-auth' === $auth['username']
$options['bitbucket-token'] = $auth['password']; ) {
} $options['bitbucket-token'] = $auth['password'];
} else { } else {
$authStr = base64_encode($auth['username'] . ':' . $auth['password']); $authStr = base64_encode($auth['username'] . ':' . $auth['password']);
$headers[] = 'Authorization: Basic '.$authStr; $headers[] = 'Authorization: Basic '.$authStr;