package and depencies
This commit is contained in:
@@ -26,15 +26,8 @@ class MetadataBag implements SessionBagInterface
|
||||
public const UPDATED = 'u';
|
||||
public const LIFETIME = 'l';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name = '__metadata';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $storageKey;
|
||||
private string $name = '__metadata';
|
||||
private string $storageKey;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
@@ -43,15 +36,10 @@ class MetadataBag implements SessionBagInterface
|
||||
|
||||
/**
|
||||
* Unix timestamp.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $lastUsed;
|
||||
private int $lastUsed;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $updateThreshold;
|
||||
private int $updateThreshold;
|
||||
|
||||
/**
|
||||
* @param string $storageKey The key used to store bag in the session
|
||||
@@ -63,9 +51,6 @@ class MetadataBag implements SessionBagInterface
|
||||
$this->updateThreshold = $updateThreshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function initialize(array &$array)
|
||||
{
|
||||
$this->meta = &$array;
|
||||
@@ -84,10 +69,8 @@ class MetadataBag implements SessionBagInterface
|
||||
|
||||
/**
|
||||
* Gets the lifetime that the session cookie was set with.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getLifetime()
|
||||
public function getLifetime(): int
|
||||
{
|
||||
return $this->meta[self::LIFETIME];
|
||||
}
|
||||
@@ -105,10 +88,7 @@ class MetadataBag implements SessionBagInterface
|
||||
$this->stampCreated($lifetime);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getStorageKey()
|
||||
public function getStorageKey(): string
|
||||
{
|
||||
return $this->storageKey;
|
||||
}
|
||||
@@ -118,7 +98,7 @@ class MetadataBag implements SessionBagInterface
|
||||
*
|
||||
* @return int Unix timestamp
|
||||
*/
|
||||
public function getCreated()
|
||||
public function getCreated(): int
|
||||
{
|
||||
return $this->meta[self::CREATED];
|
||||
}
|
||||
@@ -128,24 +108,18 @@ class MetadataBag implements SessionBagInterface
|
||||
*
|
||||
* @return int Unix timestamp
|
||||
*/
|
||||
public function getLastUsed()
|
||||
public function getLastUsed(): int
|
||||
{
|
||||
return $this->lastUsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function clear()
|
||||
public function clear(): mixed
|
||||
{
|
||||
// nothing to do
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user