Skip to content

Commit

Permalink
Add stubcsrf
Browse files Browse the repository at this point in the history
  • Loading branch information
hacan359 committed Feb 7, 2024
1 parent 91e6821 commit 272b99b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StubCsrfToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 272b99b

Please sign in to comment.