diff --git a/src/AuthContext.php b/src/AuthContext.php index a2774121..14ec2408 100644 --- a/src/AuthContext.php +++ b/src/AuthContext.php @@ -21,7 +21,7 @@ public function __construct( ) { } - public function start(TokenInterface $token, string $transport = null): void + public function start(TokenInterface $token, ?string $transport = null): void { $this->closed = false; $this->actor = null; diff --git a/src/AuthContextInterface.php b/src/AuthContextInterface.php index bc7d893b..645327ab 100644 --- a/src/AuthContextInterface.php +++ b/src/AuthContextInterface.php @@ -12,7 +12,7 @@ interface AuthContextInterface /** * Start new auth context based on a given token. Actor can be received on demand. */ - public function start(TokenInterface $token, string $transport = null): void; + public function start(TokenInterface $token, ?string $transport = null): void; /** * Returns associated token if any. diff --git a/src/TokenStorageInterface.php b/src/TokenStorageInterface.php index de823dae..62e027d6 100644 --- a/src/TokenStorageInterface.php +++ b/src/TokenStorageInterface.php @@ -21,11 +21,9 @@ public function load(string $id): ?TokenInterface; /** * Create token based on the payload provided by actor provider. * - * @param \DateTimeInterface|null $expiresAt - * * @throws TokenStorageException */ - public function create(array $payload, \DateTimeInterface $expiresAt = null): TokenInterface; + public function create(array $payload, ?\DateTimeInterface $expiresAt = null): TokenInterface; /** * Delete token from the persistent storage. diff --git a/tests/Stub/TestAuthToken.php b/tests/Stub/TestAuthToken.php index de8b2f2f..99f2c4c5 100644 --- a/tests/Stub/TestAuthToken.php +++ b/tests/Stub/TestAuthToken.php @@ -22,7 +22,7 @@ class TestAuthToken implements TokenInterface * @param array $payload * @param \DateTimeInterface|null $expiresAt */ - public function __construct(string $id, array $payload, \DateTimeInterface $expiresAt = null) + public function __construct(string $id, array $payload, ?\DateTimeInterface $expiresAt = null) { $this->id = $id; $this->expiresAt = $expiresAt;