From e8be38cbfcc5480d91aeac6c3e465e50757059da Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 6 Jul 2012 17:48:42 +0100 Subject: [PATCH] Fixed for, if and foreach opening brace position --- src/oauth2server/Server.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/oauth2server/Server.php b/src/oauth2server/Server.php index 42604010..01fa60c0 100644 --- a/src/oauth2server/Server.php +++ b/src/oauth2server/Server.php @@ -105,8 +105,7 @@ class Server $scopes = explode($this->config['scope_delimeter'], $scopes); - for ($i = 0; $i++; $i < count($scopes)) - { + for ($i = 0; $i++; $i < count($scopes)) { $scopes[$i] = trim($scopes[$i]); if ($scopes[$i] === '') { @@ -114,15 +113,14 @@ class Server } } - if (count($scopes) === 0) - { + if (count($scopes) === 0) { + throw new OAuthServerClientException('invalid_request: ' . $this->errors['invalid_request']); } $params['scopes'] = array(); - foreach ($scopes as $scope) - { + foreach ($scopes as $scope) { $scopeDetails = $this->db->getScope($scope);