for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Jasny\Auth\Session\Jwt;
/**
* Temporary store of the JWT cookie.
*/
class CookieValue implements CookieInterface
{
protected ?string $value;
protected int $expire = 0;
* Cookies constructor.
public function __construct(?string $value = null)
$this->value = $value;
}
* @inheritDoc
public function get(): ?string
return $this->value;
public function set(string $value, int $expire): void
$this->expire = $expire;
public function clear(): void
$this->value = null;
$this->expire = 1;
* Get expire time for the cookie.
public function getExpire(): int
return $this->expire;