PSR fixes

This commit is contained in:
Alex Bilbie 2014-05-08 11:52:51 +01:00
parent 58adefa7d0
commit b9cedc8b93
2 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@ abstract class AbstractTokenType
/** /**
* Determine the access token in the authorization header * Determine the access token in the authorization header
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* @return string * @return string
*/ */
abstract public function determineAccessTokenInHeader(Request $request); abstract public function determineAccessTokenInHeader(Request $request);

View File

@ -41,6 +41,7 @@ class Bearer extends AbstractTokenType implements TokenTypeInterface
{ {
$header = $request->headers->get('Authorization'); $header = $request->headers->get('Authorization');
$accessToken = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header)); $accessToken = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
return ($accessToken === 'Bearer') ? '' : $accessToken; return ($accessToken === 'Bearer') ? '' : $accessToken;
} }
} }