phpstan fixes
This commit is contained in:
@ -10,8 +10,8 @@ use NoccyLabs\SimpleJWT\Key\KeyInterface;
|
||||
*
|
||||
*
|
||||
*
|
||||
* @property-read header PropertyBag
|
||||
* @property-read claim PropertyBag
|
||||
* @property-read PropertyBag $header
|
||||
* @property-read PropertyBag $claims
|
||||
*/
|
||||
class JWTToken
|
||||
{
|
||||
@ -30,7 +30,8 @@ class JWTToken
|
||||
* Constructor
|
||||
*
|
||||
*
|
||||
* @param KeyInterface The key used to sign the token
|
||||
* @param KeyInterface $key The key used to sign the token
|
||||
* @param string|null $token Token data
|
||||
*/
|
||||
public function __construct(KeyInterface $key, ?string $token=null)
|
||||
{
|
||||
@ -127,6 +128,8 @@ class JWTToken
|
||||
case 'm':
|
||||
$fact = 60;
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
$this->header->set('exp', time() + (intval($match[1]) * $fact));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user