diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index 0a1cf824..c9cf177e 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -190,9 +190,9 @@ abstract class AbstractGrant implements GrantTypeInterface /** * Validate scopes in the request. * - * @param string $scopes + * @param string $scopes * @param \League\OAuth2\Server\Entities\ClientEntityInterface $client - * @param string $redirectUri + * @param string $redirectUri * * @throws \League\OAuth2\Server\Exception\OAuthServerException * @@ -285,9 +285,9 @@ abstract class AbstractGrant implements GrantTypeInterface /** * Issue an access token. * - * @param \DateInterval $accessTokenTTL + * @param \DateInterval $accessTokenTTL * @param \League\OAuth2\Server\Entities\ClientEntityInterface $client - * @param string $userIdentifier + * @param string $userIdentifier * @param \League\OAuth2\Server\Entities\ScopeEntityInterface[] $scopes * * @return \League\OAuth2\Server\Entities\AccessTokenEntityInterface @@ -316,10 +316,10 @@ abstract class AbstractGrant implements GrantTypeInterface /** * Issue an auth code. * - * @param \DateInterval $authCodeTTL + * @param \DateInterval $authCodeTTL * @param \League\OAuth2\Server\Entities\ClientEntityInterface $client - * @param string $userIdentifier - * @param string $redirectUri + * @param string $userIdentifier + * @param string $redirectUri * @param \League\OAuth2\Server\Entities\ScopeEntityInterface[] $scopes * * @return \League\OAuth2\Server\Entities\AuthCodeEntityInterface diff --git a/src/Grant/PasswordGrant.php b/src/Grant/PasswordGrant.php index 2e3dddd0..d41d7f79 100644 --- a/src/Grant/PasswordGrant.php +++ b/src/Grant/PasswordGrant.php @@ -66,7 +66,7 @@ class PasswordGrant extends AbstractGrant } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request * @param \League\OAuth2\Server\Entities\ClientEntityInterface $client * * @throws \League\OAuth2\Server\Exception\OAuthServerException diff --git a/src/Repositories/AccessTokenRepositoryInterface.php b/src/Repositories/AccessTokenRepositoryInterface.php index 426d71f8..a8655253 100644 --- a/src/Repositories/AccessTokenRepositoryInterface.php +++ b/src/Repositories/AccessTokenRepositoryInterface.php @@ -23,7 +23,7 @@ interface AccessTokenRepositoryInterface extends RepositoryInterface * * @param \League\OAuth2\Server\Entities\ClientEntityInterface $clientEntity * @param \League\OAuth2\Server\Entities\ScopeEntityInterface[] $scopes - * @param mixed $userIdentifier + * @param mixed $userIdentifier * * @return AccessTokenEntityInterface */ diff --git a/src/Repositories/ScopeRepositoryInterface.php b/src/Repositories/ScopeRepositoryInterface.php index 524f1702..a1363c2b 100644 --- a/src/Repositories/ScopeRepositoryInterface.php +++ b/src/Repositories/ScopeRepositoryInterface.php @@ -31,10 +31,10 @@ interface ScopeRepositoryInterface extends RepositoryInterface * Given a client, grant type and optional user identifier validate the set of scopes requested are valid and optionally * append additional scopes or remove requested scopes. * - * @param ScopeEntityInterface[] $scopes - * @param string $grantType + * @param ScopeEntityInterface[] $scopes + * @param string $grantType * @param \League\OAuth2\Server\Entities\ClientEntityInterface $clientEntity - * @param null|string $userIdentifier + * @param null|string $userIdentifier * * @return \League\OAuth2\Server\Entities\ScopeEntityInterface[] */ diff --git a/src/Repositories/UserRepositoryInterface.php b/src/Repositories/UserRepositoryInterface.php index f00436e8..f6745c1d 100644 --- a/src/Repositories/UserRepositoryInterface.php +++ b/src/Repositories/UserRepositoryInterface.php @@ -9,9 +9,9 @@ interface UserRepositoryInterface extends RepositoryInterface /** * Get a user entity. * - * @param string $username - * @param string $password - * @param string $grantType The grant type used + * @param string $username + * @param string $password + * @param string $grantType The grant type used * @param \League\OAuth2\Server\Entities\ClientEntityInterface $clientEntity * * @return \League\OAuth2\Server\Entities\UserEntityInterface diff --git a/tests/Grant/AbstractGrantTest.php b/tests/Grant/AbstractGrantTest.php index 559a5269..78957b75 100644 --- a/tests/Grant/AbstractGrantTest.php +++ b/tests/Grant/AbstractGrantTest.php @@ -13,9 +13,9 @@ use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; -use LeagueTests\Stubs\ClientEntity; -use LeagueTests\Stubs\AuthCodeEntity; use LeagueTests\Stubs\AccessTokenEntity; +use LeagueTests\Stubs\AuthCodeEntity; +use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\RefreshTokenEntity; use LeagueTests\Stubs\ScopeEntity; use Zend\Diactoros\ServerRequest; diff --git a/tests/Grant/AuthCodeGrantTest.php b/tests/Grant/AuthCodeGrantTest.php index b49ecd18..3d1064bf 100644 --- a/tests/Grant/AuthCodeGrantTest.php +++ b/tests/Grant/AuthCodeGrantTest.php @@ -3,11 +3,8 @@ namespace LeagueTests\Grant; use League\OAuth2\Server\CryptKey; -use LeagueTests\Stubs\AccessTokenEntity; -use LeagueTests\Stubs\AuthCodeEntity; use League\OAuth2\Server\Entities\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; -use LeagueTests\Stubs\RefreshTokenEntity; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\AuthCodeGrant; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; @@ -18,8 +15,11 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; use League\OAuth2\Server\ResponseTypes\HtmlResponse; use League\OAuth2\Server\ResponseTypes\RedirectResponse; +use LeagueTests\Stubs\AccessTokenEntity; +use LeagueTests\Stubs\AuthCodeEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\CryptTraitStub; +use LeagueTests\Stubs\RefreshTokenEntity; use LeagueTests\Stubs\ScopeEntity; use LeagueTests\Stubs\StubResponseType; use LeagueTests\Stubs\UserEntity; diff --git a/tests/Grant/ClientCredentialsGrantTest.php b/tests/Grant/ClientCredentialsGrantTest.php index dc883a0e..c334228e 100644 --- a/tests/Grant/ClientCredentialsGrantTest.php +++ b/tests/Grant/ClientCredentialsGrantTest.php @@ -2,12 +2,12 @@ namespace LeagueTests\Grant; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Entities\AccessTokenEntityInterface; use League\OAuth2\Server\Grant\ClientCredentialsGrant; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\StubResponseType; use Zend\Diactoros\ServerRequest; diff --git a/tests/Grant/ImplicitGrantTest.php b/tests/Grant/ImplicitGrantTest.php index 5636de0e..f8d42930 100644 --- a/tests/Grant/ImplicitGrantTest.php +++ b/tests/Grant/ImplicitGrantTest.php @@ -3,7 +3,6 @@ namespace LeagueTests\Grant; use League\OAuth2\Server\CryptKey; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\ImplicitGrant; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; @@ -12,6 +11,7 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; use League\OAuth2\Server\ResponseTypes\HtmlResponse; use League\OAuth2\Server\ResponseTypes\RedirectResponse; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\CryptTraitStub; use LeagueTests\Stubs\StubResponseType; diff --git a/tests/Grant/PasswordGrantTest.php b/tests/Grant/PasswordGrantTest.php index f8827720..d8b310af 100644 --- a/tests/Grant/PasswordGrantTest.php +++ b/tests/Grant/PasswordGrantTest.php @@ -2,17 +2,17 @@ namespace LeagueTests\Grant; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Entities\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; -use LeagueTests\Stubs\RefreshTokenEntity; use League\OAuth2\Server\Grant\PasswordGrant; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; +use LeagueTests\Stubs\RefreshTokenEntity; use LeagueTests\Stubs\StubResponseType; use LeagueTests\Stubs\UserEntity; use Zend\Diactoros\ServerRequest; diff --git a/tests/Grant/RefreshTokenGrantTest.php b/tests/Grant/RefreshTokenGrantTest.php index b19dce9c..d8eb0182 100644 --- a/tests/Grant/RefreshTokenGrantTest.php +++ b/tests/Grant/RefreshTokenGrantTest.php @@ -3,17 +3,17 @@ namespace LeagueTests\Grant; use League\OAuth2\Server\CryptKey; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Entities\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; -use LeagueTests\Stubs\RefreshTokenEntity; use League\OAuth2\Server\Grant\RefreshTokenGrant; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\CryptTraitStub; +use LeagueTests\Stubs\RefreshTokenEntity; use LeagueTests\Stubs\ScopeEntity; use LeagueTests\Stubs\StubResponseType; use Zend\Diactoros\ServerRequest; diff --git a/tests/Middleware/AuthenticationServerMiddlewareTest.php b/tests/Middleware/AuthenticationServerMiddlewareTest.php index cbc3cf62..d5f82594 100644 --- a/tests/Middleware/AuthenticationServerMiddlewareTest.php +++ b/tests/Middleware/AuthenticationServerMiddlewareTest.php @@ -2,13 +2,13 @@ namespace LeagueTests\Middleware; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Grant\ClientCredentialsGrant; use League\OAuth2\Server\Middleware\AuthenticationServerMiddleware; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Server; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\StubResponseType; use Zend\Diactoros\Response; diff --git a/tests/Middleware/ResourceServerMiddlewareTest.php b/tests/Middleware/ResourceServerMiddlewareTest.php index a3517d1d..5656d3d1 100644 --- a/tests/Middleware/ResourceServerMiddlewareTest.php +++ b/tests/Middleware/ResourceServerMiddlewareTest.php @@ -3,12 +3,12 @@ namespace LeagueTests\Middleware; use League\OAuth2\Server\CryptKey; -use LeagueTests\Stubs\AccessTokenEntity; use League\OAuth2\Server\Middleware\ResourceServerMiddleware; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Server; +use LeagueTests\Stubs\AccessTokenEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\StubResponseType; use Zend\Diactoros\Response; diff --git a/tests/ResponseTypes/BearerResponseTypeTest.php b/tests/ResponseTypes/BearerResponseTypeTest.php index d6e75fdf..003b517c 100644 --- a/tests/ResponseTypes/BearerResponseTypeTest.php +++ b/tests/ResponseTypes/BearerResponseTypeTest.php @@ -2,14 +2,14 @@ namespace LeagueTests\ResponseTypes; +use \Stubs\AccessTokenEntity; use League\OAuth2\Server\AuthorizationValidators\BearerTokenValidator; -use League\OAuth2\Server\CryptKey; -use\LeagueTests\Stubs\AccessTokenEntity; -use LeagueTests\Stubs\RefreshTokenEntity; +useLeagueTestsLeague\OAuth2\Server\CryptKey; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\ResponseTypes\BearerTokenResponse; use LeagueTests\Stubs\ClientEntity; +use LeagueTests\Stubs\RefreshTokenEntity; use LeagueTests\Stubs\ScopeEntity; use Psr\Http\Message\ResponseInterface; use Zend\Diactoros\Response; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index ec261b6f..68dae3b1 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -2,8 +2,6 @@ namespace LeagueTests; -use LeagueTests\Stubs\AccessTokenEntity; -use LeagueTests\Stubs\AuthCodeEntity; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\AuthCodeGrant; use League\OAuth2\Server\Grant\ClientCredentialsGrant; @@ -15,6 +13,8 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; use League\OAuth2\Server\ResponseTypes\BearerTokenResponse; use League\OAuth2\Server\Server; +use LeagueTests\Stubs\AccessTokenEntity; +use LeagueTests\Stubs\AuthCodeEntity; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\StubResponseType; use LeagueTests\Stubs\UserEntity; diff --git a/tests/Stubs/ClientEntity.php b/tests/Stubs/ClientEntity.php index 04fcae75..0c6a4f9b 100644 --- a/tests/Stubs/ClientEntity.php +++ b/tests/Stubs/ClientEntity.php @@ -19,5 +19,4 @@ class ClientEntity implements ClientEntityInterface { $this->name = $name; } - }