Skip to content

Commit 17ffc23

Browse files
committed
Update code style
1 parent c981b76 commit 17ffc23

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bundle/Security/Authentication/Token/TwoFactorToken.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use LogicException;
1010
use RuntimeException;
1111
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Exception\UnknownTwoFactorProviderException;
12+
use Stringable;
1213
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1314
use Symfony\Component\Security\Core\User\UserInterface;
1415
use function array_key_exists;
@@ -22,7 +23,7 @@
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 = [];

src/trusted-device/Security/TwoFactor/Trusted/TrustedDeviceTokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)