From 6897e233d4b1274fe924d3e48d8e7af2f3a13cfc Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 5 May 2013 18:05:46 +0100 Subject: [PATCH] Changed variable syntax style to be PSR2 --- src/OAuth2/ResourceServer.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/OAuth2/ResourceServer.php b/src/OAuth2/ResourceServer.php index 195f98ed..474b1635 100644 --- a/src/OAuth2/ResourceServer.php +++ b/src/OAuth2/ResourceServer.php @@ -163,15 +163,15 @@ class ResourceServer */ public function isValid() { - $access_token = $this->determineAccessToken(); + $accessToken = $this->determineAccessToken(); - $result = $this->storages['session']->validateAccessToken($access_token); + $result = $this->storages['session']->validateAccessToken($accessToken); if ( ! $result) { throw new Exception\InvalidAccessTokenException('Access token is not valid'); } - $this->accessToken = $access_token; + $this->accessToken = $accessToken; $this->sessionId = $result['id']; $this->ownerType = $result['owner_type']; $this->ownerId = $result['owner_id']; @@ -215,17 +215,17 @@ class ResourceServer protected function determineAccessToken() { if ($header = $this->getRequest()->header('Authorization')) { - $access_token = trim(str_replace('Bearer', '', $header)); + $accessToken = trim(str_replace('Bearer', '', $header)); } else { $method = $this->getRequest()->server('REQUEST_METHOD'); - $access_token = $this->getRequest()->{$method}($this->tokenKey); + $accessToken = $this->getRequest()->{$method}($this->tokenKey); } - if (empty($access_token)) { + if (empty($accessToken)) { throw new Exception\InvalidAccessTokenException('Access token is missing'); } - return $access_token; + return $accessToken; } }