Skip to content

Commit

Permalink
Allow any Throwable as $previous
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Aug 19, 2019
1 parent a7c85da commit 311d4d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Unreleased

- `Firebase\Auth\Token\Exception\InvalidToken` can now have any `Throwable` as the `$previous` parameter.

## 1.8.0 - 2019-06-12

- The "auth_time" and "iat" claims are now verified with a 5 minute leeway,
Expand Down
6 changes: 3 additions & 3 deletions src/Exception/InvalidToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Firebase\Auth\Token\Exception;

use Exception;
use Throwable;
use Lcobucci\JWT\Token;

class InvalidToken extends \InvalidArgumentException
Expand All @@ -12,14 +12,14 @@ class InvalidToken extends \InvalidArgumentException
*/
private $token;

public function __construct(Token $token, $message = '', $code = 0, Exception $previous = null)
public function __construct(Token $token, $message = '', $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);

$this->token = $token;
}

public function getToken()
public function getToken(): Token
{
return $this->token;
}
Expand Down

0 comments on commit 311d4d5

Please sign in to comment.