Skip to content

Commit 44cea38

Browse files
committed
Move exceptions to its own namespace
1 parent d692e7d commit 44cea38

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Authorizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use League\OAuth2\Server\ResourceServer as Checker;
1717
use League\OAuth2\Server\TokenType\TokenTypeInterface;
1818
use League\OAuth2\Server\Util\RedirectUri;
19+
use LucaDegasperi\OAuth2Server\Exceptions\NoActiveAccessTokenException;
1920
use Symfony\Component\HttpFoundation\Request;
2021

2122
/**
@@ -91,7 +92,7 @@ public function getChecker()
9192
*
9293
* If the session does not have an active access token, an exception will be thrown.
9394
*
94-
* @throws \LucaDegasperi\OAuth2Server\NoActiveAccessTokenException
95+
* @throws \LucaDegasperi\OAuth2Server\Exceptions\NoActiveAccessTokenException
9596
*
9697
* @return \League\OAuth2\Server\Entity\AccessTokenEntity
9798
*/

src/NoActiveAccessTokenException.php renamed to src/Exceptions/NoActiveAccessTokenException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace LucaDegasperi\OAuth2Server;
12+
namespace LucaDegasperi\OAuth2Server\Exceptions;
1313

1414
use Exception;
1515

@@ -20,4 +20,5 @@
2020
*/
2121
class NoActiveAccessTokenException extends Exception
2222
{
23+
//
2324
}

tests/unit/LucaDegasperi/OAuth2Server/AuthorizerSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use League\OAuth2\Server\Grant\AuthCodeGrant;
1919
use League\OAuth2\Server\ResourceServer;
2020
use League\OAuth2\Server\Util\RedirectUri;
21-
use LucaDegasperi\OAuth2Server\NoActiveAccessTokenException;
21+
use LucaDegasperi\OAuth2Server\Exceptions\NoActiveAccessTokenException;
2222
use PhpSpec\ObjectBehavior;
2323
use Symfony\Component\HttpFoundation\Request;
2424

0 commit comments

Comments
 (0)