Fixed brace placement

This commit is contained in:
Alex Bilbie 2012-07-06 19:28:09 +01:00
parent e3ee9e84d2
commit 1c5d239087

View File

@ -192,10 +192,11 @@ class Server
foreach ($authoriseParams['scopes'] as $scope) { foreach ($authoriseParams['scopes'] as $scope) {
if ( ! in_array($scope, $originalScopes)) if ( ! in_array($scope, $originalScopes)) {
{
throw new OAuthServerClientException('invalid_scope: ' . throw new OAuthServerClientException('invalid_scope: ' .
$this->errors['invalid_scope']); $this->errors['invalid_scope']);
} }
} }
@ -208,10 +209,9 @@ class Server
$authoriseParams['scopes'], $accessToken); $authoriseParams['scopes'], $accessToken);
return $authCode; return $authCode;
}
} else {
else
{
$authCode = $this->newAuthCode($authoriseParams['client_id'], $authCode = $this->newAuthCode($authoriseParams['client_id'],
'user', $typeId, $authoriseParams['redirect_uri'], 'user', $typeId, $authoriseParams['redirect_uri'],
$authoriseParams['scopes']); $authoriseParams['scopes']);
@ -268,9 +268,10 @@ class Server
); );
// Add the scopes // Add the scopes
foreach ($scopes as $scope) foreach ($scopes as $scope) {
{
$this->db->addSessionScope($sessionId, $scope); $this->db->addSessionScope($sessionId, $scope);
} }
} }