composer update
This commit is contained in:
@@ -27,9 +27,8 @@ class MockFileSessionStorage extends MockArraySessionStorage
|
||||
private $savePath;
|
||||
|
||||
/**
|
||||
* @param string $savePath Path of directory to save session files
|
||||
* @param string $name Session name
|
||||
* @param MetadataBag $metaBag MetadataBag instance
|
||||
* @param string $savePath Path of directory to save session files
|
||||
* @param string $name Session name
|
||||
*/
|
||||
public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null)
|
||||
{
|
||||
@@ -122,7 +121,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
|
||||
* Deletes a session from persistent storage.
|
||||
* Deliberately leaves session data in memory intact.
|
||||
*/
|
||||
private function destroy()
|
||||
private function destroy(): void
|
||||
{
|
||||
if (is_file($this->getFilePath())) {
|
||||
unlink($this->getFilePath());
|
||||
@@ -131,10 +130,8 @@ class MockFileSessionStorage extends MockArraySessionStorage
|
||||
|
||||
/**
|
||||
* Calculate path to file.
|
||||
*
|
||||
* @return string File path
|
||||
*/
|
||||
private function getFilePath()
|
||||
private function getFilePath(): string
|
||||
{
|
||||
return $this->savePath.'/'.$this->id.'.mocksess';
|
||||
}
|
||||
@@ -142,7 +139,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
|
||||
/**
|
||||
* Reads session from storage and loads session.
|
||||
*/
|
||||
private function read()
|
||||
private function read(): void
|
||||
{
|
||||
$filePath = $this->getFilePath();
|
||||
$this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : [];
|
||||
|
||||
Reference in New Issue
Block a user