session save return type (#133)
This commit is contained in:
parent
9be9e38815
commit
85549cb835
2 changed files with 3 additions and 3 deletions
|
|
@ -51,9 +51,9 @@ class Session implements SessionInterface
|
|||
return $this->store;
|
||||
}
|
||||
|
||||
public function save(): void
|
||||
public function save(): bool
|
||||
{
|
||||
$this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR));
|
||||
return $this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR));
|
||||
}
|
||||
|
||||
public function get(string $key, mixed $default = null): mixed
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ interface SessionInterface extends \JsonSerializable
|
|||
/**
|
||||
* Save the session.
|
||||
*/
|
||||
public function save(): void;
|
||||
public function save(): bool;
|
||||
|
||||
/**
|
||||
* Get a specific attribute from the session.
|
||||
|
|
|
|||
Loading…
Reference in a new issue