File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
bundle/Security/Authentication/Token
trusted-device/Security/TwoFactor/Trusted Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 99use LogicException ;
1010use RuntimeException ;
1111use Scheb \TwoFactorBundle \Security \TwoFactor \Provider \Exception \UnknownTwoFactorProviderException ;
12+ use Stringable ;
1213use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
1314use Symfony \Component \Security \Core \User \UserInterface ;
1415use function array_key_exists ;
2223/**
2324 * @api Part of the bundle's public API, may be extended
2425 */
25- class TwoFactorToken implements TwoFactorTokenInterface
26+ class TwoFactorToken implements Stringable, TwoFactorTokenInterface
2627{
2728 /** @var array<string,mixed> */
2829 private array $ attributes = [];
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ private function readCookieValue(): string|null
145145 {
146146 $cookieValue = $this->getRequest()->cookies->get($this->cookieName, null);
147147
148- return null === $ cookieValue ? null : ( string ) $ cookieValue ;
148+ return $cookieValue ?? null;
149149 }
150150
151151 private function getRequest(): Request
You can’t perform that action at this time.
0 commit comments