session save return type (#133)

This commit is contained in:
Antoine Bluchet 2025-11-04 22:45:41 +01:00 • committed by GitHub
commit 85549cb835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -51,9 +51,9 @@ class Session implements SessionInterface
return $this->store; 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 public function get(string $key, mixed $default = null): mixed

View file

@ -26,7 +26,7 @@ interface SessionInterface extends \JsonSerializable
/** /**
* Save the session. * Save the session.
*/ */
public function save(): void; public function save(): bool;
/** /**
* Get a specific attribute from the session. * Get a specific attribute from the session.