From 272b99b8d4588f9b39d7b76656f4fe7207c54d7b Mon Sep 17 00:00:00 2001 From: hacan359 <05hacan@gmail.com> Date: Wed, 7 Feb 2024 18:16:19 +0300 Subject: [PATCH] Add stubcsrf --- src/StubCsrfToken.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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