diff --git a/Security/Http/Cookie/JWTCookieProvider.php b/Security/Http/Cookie/JWTCookieProvider.php index 12b62129..f8cb9140 100644 --- a/Security/Http/Cookie/JWTCookieProvider.php +++ b/Security/Http/Cookie/JWTCookieProvider.php @@ -51,7 +51,7 @@ public function createCookie(string $jwt, ?string $name = null, $expiresAt = nul $jwt = $jwtParts->getParts($split ?: $this->defaultSplit); if (null === $expiresAt) { - $expiresAt = $this->defaultLifetime == 0 ? 0 : (time() + $this->defaultLifetime); + $expiresAt = 0 === $this->defaultLifetime ? 0 : (time() + $this->defaultLifetime); } return new Cookie( diff --git a/Tests/Security/Http/Cookie/JWTCookieProviderTest.php b/Tests/Security/Http/Cookie/JWTCookieProviderTest.php index 9fe7def8..7c4ed7f8 100644 --- a/Tests/Security/Http/Cookie/JWTCookieProviderTest.php +++ b/Tests/Security/Http/Cookie/JWTCookieProviderTest.php @@ -35,4 +35,4 @@ public function testCreateSessionCookie() $this->assertEquals(0, $cookie->getExpiresTime()); } -} \ No newline at end of file +}