package and depencies
This commit is contained in:
@@ -18,17 +18,17 @@ namespace Symfony\Component\HttpFoundation\Session;
|
||||
*/
|
||||
final class SessionBagProxy implements SessionBagInterface
|
||||
{
|
||||
private $bag;
|
||||
private $data;
|
||||
private $usageIndex;
|
||||
private $usageReporter;
|
||||
private SessionBagInterface $bag;
|
||||
private array $data;
|
||||
private ?int $usageIndex;
|
||||
private ?\Closure $usageReporter;
|
||||
|
||||
public function __construct(SessionBagInterface $bag, array &$data, ?int &$usageIndex, ?callable $usageReporter)
|
||||
{
|
||||
$this->bag = $bag;
|
||||
$this->data = &$data;
|
||||
$this->usageIndex = &$usageIndex;
|
||||
$this->usageReporter = $usageReporter;
|
||||
$this->usageReporter = null === $usageReporter ? null : $usageReporter(...);
|
||||
}
|
||||
|
||||
public function getBag(): SessionBagInterface
|
||||
@@ -54,17 +54,11 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
return empty($this->data[$this->bag->getStorageKey()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->bag->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function initialize(array &$array): void
|
||||
{
|
||||
++$this->usageIndex;
|
||||
@@ -77,18 +71,12 @@ final class SessionBagProxy implements SessionBagInterface
|
||||
$this->bag->initialize($array);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getStorageKey(): string
|
||||
{
|
||||
return $this->bag->getStorageKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function clear()
|
||||
public function clear(): mixed
|
||||
{
|
||||
return $this->bag->clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user