Skip to content

Commit e4ca240

Browse files
committed
session save return type
1 parent ff26b4f commit e4ca240

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Server/Session/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function getStore(): SessionStoreInterface
5151
return $this->store;
5252
}
5353

54-
public function save(): void
54+
public function save(): bool
5555
{
56-
$this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR));
56+
return $this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR));
5757
}
5858

5959
public function get(string $key, mixed $default = null): mixed

src/Server/Session/SessionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getId(): Uuid;
2626
/**
2727
* Save the session.
2828
*/
29-
public function save(): void;
29+
public function save(): bool;
3030

3131
/**
3232
* Get a specific attribute from the session.

0 commit comments

Comments
 (0)