Skip to content

Commit

Permalink
implement base exception (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi authored May 31, 2024
1 parent 5b7d4e8 commit 9214d76
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 27 deletions.
4 changes: 1 addition & 3 deletions src/Exceptions/InvalidKeyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class InvalidKeyException extends Exception
class InvalidKeyException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/InvalidSignatureException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class InvalidSignatureException extends Exception
class InvalidSignatureException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/InvalidTokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class InvalidTokenException extends Exception
class InvalidTokenException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/JsonDecodingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class JsonDecodingException extends Exception
class JsonDecodingException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/JsonEncodingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class JsonEncodingException extends Exception
class JsonEncodingException extends JwtException
{
//
}
10 changes: 10 additions & 0 deletions src/Exceptions/JwtException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class JwtException extends Exception
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/NoKidException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class NoKidException extends Exception
class NoKidException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/SigningException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class SigningException extends Exception
class SigningException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/ValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class ValidationException extends Exception
class ValidationException extends JwtException
{
//
}
4 changes: 1 addition & 3 deletions src/Exceptions/VerifierNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace MiladRahimi\Jwt\Exceptions;

use Exception;

class VerifierNotFoundException extends Exception
class VerifierNotFoundException extends JwtException
{
//
}

0 comments on commit 9214d76

Please sign in to comment.