package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -25,16 +25,14 @@ namespace Symfony\Component\HttpFoundation\Session\Storage;
*/
class MockFileSessionStorage extends MockArraySessionStorage
{
private $savePath;
private string $savePath;
/**
* @param string|null $savePath Path of directory to save session files
*/
public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null)
{
if (null === $savePath) {
$savePath = sys_get_temp_dir();
}
$savePath ??= sys_get_temp_dir();
if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) {
throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $savePath));
@@ -45,10 +43,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
parent::__construct($name, $metaBag);
}
/**
* {@inheritdoc}
*/
public function start()
public function start(): bool
{
if ($this->started) {
return true;
@@ -65,10 +60,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
return true;
}
/**
* {@inheritdoc}
*/
public function regenerate(bool $destroy = false, int $lifetime = null)
public function regenerate(bool $destroy = false, int $lifetime = null): bool
{
if (!$this->started) {
$this->start();
@@ -81,9 +73,6 @@ class MockFileSessionStorage extends MockArraySessionStorage
return parent::regenerate($destroy, $lifetime);
}
/**
* {@inheritdoc}
*/
public function save()
{
if (!$this->started) {