updated-packages
This commit is contained in:
@@ -22,27 +22,21 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
private $data;
|
||||
private $usageIndex;
|
||||
|
||||
public function __construct(SessionBagInterface $bag, array &$data, &$usageIndex)
|
||||
public function __construct(SessionBagInterface $bag, array &$data, ?int &$usageIndex)
|
||||
{
|
||||
$this->bag = $bag;
|
||||
$this->data = &$data;
|
||||
$this->usageIndex = &$usageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SessionBagInterface
|
||||
*/
|
||||
public function getBag()
|
||||
public function getBag(): SessionBagInterface
|
||||
{
|
||||
++$this->usageIndex;
|
||||
|
||||
return $this->bag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty()
|
||||
public function isEmpty(): bool
|
||||
{
|
||||
if (!isset($this->data[$this->bag->getStorageKey()])) {
|
||||
return true;
|
||||
@@ -55,7 +49,7 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->bag->getName();
|
||||
}
|
||||
@@ -63,7 +57,7 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function initialize(array &$array)
|
||||
public function initialize(array &$array): void
|
||||
{
|
||||
++$this->usageIndex;
|
||||
$this->data[$this->bag->getStorageKey()] = &$array;
|
||||
@@ -74,7 +68,7 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getStorageKey()
|
||||
public function getStorageKey(): string
|
||||
{
|
||||
return $this->bag->getStorageKey();
|
||||
}
|
||||
|
Reference in New Issue
Block a user