From f78e05cb0821aa93713d635a722ca583b9e71f17 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 2 Jun 2013 14:59:05 +0100 Subject: [PATCH] Anal space fixes --- .../OAuth2/Server/Storage/Fluent/Client.php | 24 +++++++++---------- .../OAuth2/Server/Storage/Fluent/Scope.php | 19 +++++++-------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/League/OAuth2/Server/Storage/Fluent/Client.php b/src/League/OAuth2/Server/Storage/Fluent/Client.php index 8b24811d..b8adeb0a 100644 --- a/src/League/OAuth2/Server/Storage/Fluent/Client.php +++ b/src/League/OAuth2/Server/Storage/Fluent/Client.php @@ -11,22 +11,22 @@ class Client implements ClientInterface { { if ( ! is_null($redirectUri) && is_null($clientSecret)) { $result = DB::table('oauth_clients') - ->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id') - ->where('oauth_clients.id', $clientId) - ->where('oauth_client_endpoints.redirect_uri', $redirectUri) - ->first(); + ->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id') + ->where('oauth_clients.id', $clientId) + ->where('oauth_client_endpoints.redirect_uri', $redirectUri) + ->first(); } elseif ( ! is_null($clientSecret) && is_null($redirectUri)) { $result = DB::table('oauth_clients') - ->where('id', $clientId) - ->where('secret', $clientSecret) - ->first(); + ->where('id', $clientId) + ->where('secret', $clientSecret) + ->first(); } elseif ( ! is_null($clientSecret) && ! is_null($redirectUri)) { $result = DB::table('oauth_clients') - ->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id') - ->where('oauth_clients.id', $clientId) - ->where('oauth_clients.secret', $clientSecret) - ->where('oauth_client_endpoints.redirect_uri', $redirectUri) - ->first(); + ->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id') + ->where('oauth_clients.id', $clientId) + ->where('oauth_clients.secret', $clientSecret) + ->where('oauth_client_endpoints.redirect_uri', $redirectUri) + ->first(); } if (is_null($result)) { diff --git a/src/League/OAuth2/Server/Storage/Fluent/Scope.php b/src/League/OAuth2/Server/Storage/Fluent/Scope.php index 22a2fe8a..a68b7afd 100644 --- a/src/League/OAuth2/Server/Storage/Fluent/Scope.php +++ b/src/League/OAuth2/Server/Storage/Fluent/Scope.php @@ -8,21 +8,20 @@ use \League\OAuth2\Server\Storage\ScopeInterface; class Scope implements ScopeInterface { public function getScope($scope, $clientId = null, $grantType = null) - { - $result = DB::table('oauth_scopes') - ->where('key', $scope) - ->first(); + { + $result = DB::table('oauth_scopes') + ->where('key', $scope) + ->first(); if (is_null($result)) { return false; } return array( - 'id' => $result->id, - 'scope' => $result->key, - 'name' => $result->name, - 'description' => $result->description + 'id' => $result->id, + 'scope' => $result->key, + 'name' => $result->name, + 'description' => $result->description ); - } - + } } \ No newline at end of file