Skip to content

Commit

Permalink
Fix twig extension to return a string
Browse files Browse the repository at this point in the history
  • Loading branch information
gnat42 committed Oct 8, 2022
1 parent 8ad7caf commit 831f7c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Twig/TokenGeneratorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public function getFunctions(): array
];
}

public function generateShortToken(int $id, string $email, array $extraData = null): Token
public function generateShortToken(int $id, string $email, array $extraData = null): string
{
return $this->generateToken($id, $email, $this->short, $extraData);
return $this->generateToken($id, $email, $this->short, $extraData)->toString();
}

public function generateLongToken(int $id, string $email, array $extraData = null): Token
public function generateLongToken(int $id, string $email, array $extraData = null): string
{
return $this->generateToken($id, $email, $this->long, $extraData);
return $this->generateToken($id, $email, $this->long, $extraData)->toString();
}

public function generateToken(int $id, string $email, int $expiration, array $extraData = null): Token
Expand Down

0 comments on commit 831f7c8

Please sign in to comment.