diff --git a/src/AuthorizationServerFactory.php b/src/AuthorizationServerFactory.php index 4b39df6..1aa19c5 100644 --- a/src/AuthorizationServerFactory.php +++ b/src/AuthorizationServerFactory.php @@ -11,11 +11,8 @@ use DateInterval; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Grant; -use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; 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 League\OAuth2\Server\Repositories\UserRepositoryInterface; use Psr\Container\ContainerInterface; diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 27c1605..393f9f4 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,12 +9,11 @@ namespace Zend\Expressive\Authentication\OAuth2; use League\OAuth2\Server\AuthorizationServer; -use League\OAuth2\Server\ResourceServer; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; -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 League\OAuth2\Server\ResourceServer; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo; class ConfigProvider diff --git a/src/Entity/AuthCodeEntity.php b/src/Entity/AuthCodeEntity.php index ee2492a..4d3044f 100644 --- a/src/Entity/AuthCodeEntity.php +++ b/src/Entity/AuthCodeEntity.php @@ -7,9 +7,9 @@ */ namespace Zend\Expressive\Authentication\OAuth2\Entity; -use League\OAuth2\Server\Entities\Traits\EntityTrait; -use League\OAuth2\Server\Entities\Traits\AuthCodeTrait; use League\OAuth2\Server\Entities\AuthCodeEntityInterface; +use League\OAuth2\Server\Entities\Traits\AuthCodeTrait; +use League\OAuth2\Server\Entities\Traits\EntityTrait; use League\OAuth2\Server\Entities\Traits\TokenEntityTrait; class AuthCodeEntity implements AuthCodeEntityInterface diff --git a/src/Entity/ClientEntity.php b/src/Entity/ClientEntity.php index 5724f0b..15c3cdd 100644 --- a/src/Entity/ClientEntity.php +++ b/src/Entity/ClientEntity.php @@ -7,9 +7,9 @@ */ namespace Zend\Expressive\Authentication\OAuth2\Entity; +use League\OAuth2\Server\Entities\ClientEntityInterface; use League\OAuth2\Server\Entities\Traits\ClientTrait; use League\OAuth2\Server\Entities\Traits\EntityTrait; -use League\OAuth2\Server\Entities\ClientEntityInterface; class ClientEntity implements ClientEntityInterface { diff --git a/src/Entity/RefreshTokenEntity.php b/src/Entity/RefreshTokenEntity.php index 15d227a..02401d6 100644 --- a/src/Entity/RefreshTokenEntity.php +++ b/src/Entity/RefreshTokenEntity.php @@ -7,9 +7,9 @@ */ namespace Zend\Expressive\Authentication\OAuth2\Entity; +use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; use League\OAuth2\Server\Entities\Traits\EntityTrait; use League\OAuth2\Server\Entities\Traits\RefreshTokenTrait; -use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; class RefreshTokenEntity implements RefreshTokenEntityInterface { diff --git a/src/OAuth2MiddlewareFactory.php b/src/OAuth2MiddlewareFactory.php index bcd8bac..056a124 100644 --- a/src/OAuth2MiddlewareFactory.php +++ b/src/OAuth2MiddlewareFactory.php @@ -10,8 +10,6 @@ use League\OAuth2\Server\AuthorizationServer; use Psr\Container\ContainerInterface; -use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response; use Zend\Expressive\Authentication\ResponsePrototypeTrait; class OAuth2MiddlewareFactory diff --git a/test/AuthorizationServerFactoryTest.php b/test/AuthorizationServerFactoryTest.php index f0f2cd4..ab36f58 100644 --- a/test/AuthorizationServerFactoryTest.php +++ b/test/AuthorizationServerFactoryTest.php @@ -8,9 +8,6 @@ namespace ZendTest\Expressive\Authentication\OAuth2; -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; -use Psr\Http\Message\ResponseInterface; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface; @@ -18,6 +15,8 @@ use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; +use PHPUnit\Framework\TestCase; +use Psr\Container\ContainerInterface; use Zend\Expressive\Authentication\OAuth2\AuthorizationServerFactory; class AuthorizationServerFactoryTest extends TestCase diff --git a/test/OAuth2MiddlewareFactoryTest.php b/test/OAuth2MiddlewareFactoryTest.php index efaca0a..c422a16 100644 --- a/test/OAuth2MiddlewareFactoryTest.php +++ b/test/OAuth2MiddlewareFactoryTest.php @@ -8,13 +8,13 @@ namespace ZendTest\Expressive\Authentication\OAuth2; +use League\OAuth2\Server\AuthorizationServer; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use Psr\Http\Message\ResponseInterface; -use League\OAuth2\Server\AuthorizationServer; +use Zend\Expressive\Authentication\OAuth2\Exception\InvalidConfigException; use Zend\Expressive\Authentication\OAuth2\OAuth2Middleware; use Zend\Expressive\Authentication\OAuth2\OAuth2MiddlewareFactory; -use Zend\Expressive\Authentication\OAuth2\Exception\InvalidConfigException; /** * @covers Zend\Expressive\Authentication\OAuth2\OAuth2MiddlewareFactory diff --git a/test/Pdo/OAuth2PdoMiddlewareTest.php b/test/Pdo/OAuth2PdoMiddlewareTest.php index f38b4f2..5a8f45c 100644 --- a/test/Pdo/OAuth2PdoMiddlewareTest.php +++ b/test/Pdo/OAuth2PdoMiddlewareTest.php @@ -18,9 +18,7 @@ use League\OAuth2\Server\Grant\RefreshTokenGrant; use PDO; use PHPUnit\Framework\TestCase; -use Zend\Diactoros\Request\Serializer as RequestSerializer; use Zend\Diactoros\Response; -use Zend\Diactoros\Response\Serializer as ResponseSerializer; use Zend\Diactoros\ServerRequest; use Zend\Diactoros\Stream; use Zend\Expressive\Authentication\OAuth2\OAuth2Middleware; diff --git a/test/Repository/Pdo/AuthCodeRepositoryTest.php b/test/Repository/Pdo/AuthCodeRepositoryTest.php index 56d75fb..80e5c6b 100644 --- a/test/Repository/Pdo/AuthCodeRepositoryTest.php +++ b/test/Repository/Pdo/AuthCodeRepositoryTest.php @@ -12,7 +12,6 @@ use League\OAuth2\Server\Entities\ClientEntityInterface; use League\OAuth2\Server\Entities\ScopeEntityInterface; use League\OAuth2\Server\Exception\UniqueTokenIdentifierConstraintViolationException; -use League\OAuth2\Server\Repositories\UserRepositoryInterface; use PDOStatement; use PHPUnit\Framework\TestCase; use Prophecy\Argument; diff --git a/test/Repository/Pdo/ClientRepositoryTest.php b/test/Repository/Pdo/ClientRepositoryTest.php index c73a436..770d24d 100644 --- a/test/Repository/Pdo/ClientRepositoryTest.php +++ b/test/Repository/Pdo/ClientRepositoryTest.php @@ -9,13 +9,11 @@ namespace ZendTest\Expressive\Authentication\OAuth2\Repository\Pdo; use League\OAuth2\Server\Entities\ClientEntityInterface; -use League\OAuth2\Server\Repositories\UserRepositoryInterface; use PDOStatement; use PHPUnit\Framework\TestCase; use Prophecy\Argument; -use Zend\Expressive\Authentication\OAuth2\Entity\UserEntity; -use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\ClientRepository; +use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; class ClientRepositoryTest extends TestCase { diff --git a/test/Repository/Pdo/PdoServiceFactoryTest.php b/test/Repository/Pdo/PdoServiceFactoryTest.php index 37b9ebb..2d87773 100644 --- a/test/Repository/Pdo/PdoServiceFactoryTest.php +++ b/test/Repository/Pdo/PdoServiceFactoryTest.php @@ -9,7 +9,6 @@ namespace ZendTest\Expressive\Authentication\OAuth2\Repository\Pdo; use PHPUnit\Framework\TestCase; -use Prophecy\Argument; use Psr\Container\ContainerInterface; use Zend\Expressive\Authentication\OAuth2\Exception; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; diff --git a/test/Repository/Pdo/RefreshTokenRepositoryTest.php b/test/Repository/Pdo/RefreshTokenRepositoryTest.php index 94e69c8..360db42 100644 --- a/test/Repository/Pdo/RefreshTokenRepositoryTest.php +++ b/test/Repository/Pdo/RefreshTokenRepositoryTest.php @@ -15,8 +15,8 @@ use PDOStatement; use PHPUnit\Framework\TestCase; use Prophecy\Argument; -use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\RefreshTokenRepository; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; +use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\RefreshTokenRepository; class RefreshTokenRepositoryTest extends TestCase { diff --git a/test/Repository/Pdo/ScopeRepositoryTest.php b/test/Repository/Pdo/ScopeRepositoryTest.php index 976166a..d3817f2 100644 --- a/test/Repository/Pdo/ScopeRepositoryTest.php +++ b/test/Repository/Pdo/ScopeRepositoryTest.php @@ -8,12 +8,11 @@ namespace ZendTest\Expressive\Authentication\OAuth2\Repository\Pdo; -use DateTime; use PDOStatement; use PHPUnit\Framework\TestCase; use Prophecy\Argument; -use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\ScopeRepository; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; +use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\ScopeRepository; class ScopeRepositoryTest extends TestCase { diff --git a/test/Repository/Pdo/UserRepositoryTest.php b/test/Repository/Pdo/UserRepositoryTest.php index 226546c..4bebd8b 100644 --- a/test/Repository/Pdo/UserRepositoryTest.php +++ b/test/Repository/Pdo/UserRepositoryTest.php @@ -9,11 +9,9 @@ namespace ZendTest\Expressive\Authentication\OAuth2\Repository\Pdo; use League\OAuth2\Server\Entities\ClientEntityInterface; -use League\OAuth2\Server\Repositories\UserRepositoryInterface; use PDOStatement; use PHPUnit\Framework\TestCase; use Prophecy\Argument; -use Zend\Expressive\Authentication\OAuth2\Entity\UserEntity; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\PdoService; use Zend\Expressive\Authentication\OAuth2\Repository\Pdo\UserRepository; diff --git a/test/ResourceServerFactoryTest.php b/test/ResourceServerFactoryTest.php index fecfeff..e1484a5 100644 --- a/test/ResourceServerFactoryTest.php +++ b/test/ResourceServerFactoryTest.php @@ -8,10 +8,10 @@ namespace ZendTest\Expressive\Authentication\OAuth2; -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\ResourceServer; +use PHPUnit\Framework\TestCase; +use Psr\Container\ContainerInterface; use Zend\Expressive\Authentication\OAuth2\Exception; use Zend\Expressive\Authentication\OAuth2\ResourceServerFactory;