Applied fixes from StyleCI

This commit is contained in:
Alex Bilbie
2016-02-22 03:00:50 -05:00
committed by StyleCI Bot
parent e2794c47af
commit 997d390f3d
16 changed files with 55 additions and 79 deletions

View File

@@ -2,8 +2,6 @@
namespace League\OAuth2\Server\Entities\Interfaces;
use Lcobucci\JWT\Builder;
interface AccessTokenEntityInterface extends TokenInterface
{
/**

View File

@@ -50,6 +50,7 @@ class OAuthServerException extends \Exception
/**
* Invalid grant type error.
*
* @return static
*/
public static function invalidGrantType()

View File

@@ -16,7 +16,6 @@ use League\Event\Event;
use League\OAuth2\Server\Entities\AccessTokenEntity;
use League\OAuth2\Server\Entities\AuthCodeEntity;
use League\OAuth2\Server\Entities\Interfaces\ClientEntityInterface;
use League\OAuth2\Server\Entities\Interfaces\ScopeEntityInterface;
use League\OAuth2\Server\Entities\RefreshTokenEntity;
use League\OAuth2\Server\Entities\ScopeEntity;
use League\OAuth2\Server\Exception\OAuthServerException;

View File

@@ -2,7 +2,6 @@
namespace League\OAuth2\Server\Grant;
use DateInterval;
use League\Event\Event;
use League\OAuth2\Server\Entities\Interfaces\ClientEntityInterface;
use League\OAuth2\Server\Entities\Interfaces\UserEntityInterface;

View File

@@ -102,7 +102,7 @@ class RefreshTokenGrant extends AbstractGrant
try {
$refreshToken = KeyCrypt::decrypt($encryptedRefreshToken, $this->pathToPublicKey);
} catch (\LogicException $e) {
throw OAuthServerException::invalidRefreshToken('Cannot parse refresh token: '.$e->getMessage());
throw OAuthServerException::invalidRefreshToken('Cannot parse refresh token: ' . $e->getMessage());
}
$refreshTokenData = json_decode($refreshToken, true);
@@ -110,9 +110,9 @@ class RefreshTokenGrant extends AbstractGrant
$this->getEmitter()->emit(new Event('refresh_token.client.failed', $request));
throw OAuthServerException::invalidRefreshToken(
'Token is not linked to client,'.
' got: '.$clientId.
' expected: '.$refreshTokenData['client_id']
'Token is not linked to client,' .
' got: ' . $clientId .
' expected: ' . $refreshTokenData['client_id']
);
}

View File

@@ -10,9 +10,7 @@
*/
namespace League\OAuth2\Server\ResponseTypes;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Parser;
use Lcobucci\JWT\Signer\Key;
use Lcobucci\JWT\Signer\Rsa\Sha256;
use League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface;
use League\OAuth2\Server\Exception\OAuthServerException;