diff --git a/src/StubCsrfToken.php b/src/StubCsrfToken.php index 4c55aa8..8ac264f 100644 --- a/src/StubCsrfToken.php +++ b/src/StubCsrfToken.php @@ -14,14 +14,14 @@ */ final class StubCsrfToken implements CsrfTokenInterface { - private ?string $token; + private string $token; public function __construct(?string $token = null) { - $this->token = $token; if (null === $token) { - $this->token = Random::string(); + $token = Random::string(); } + $this->token = $token; } public function getValue(): string