@@ -27,12 +27,12 @@ public function __construct()
27
27
$ this ->db = Database::getInstance ();
28
28
}
29
29
30
- public function open ($ save_path , $ sesion_name )
30
+ public function open ($ save_path , $ sesion_name ): bool
31
31
{
32
32
return true ;
33
33
}
34
34
35
- public function close ()
35
+ public function close (): bool
36
36
{
37
37
return true ;
38
38
}
@@ -41,7 +41,7 @@ public function close()
41
41
* Clear up old session entries in the database
42
42
* This should be called automatically by PHP every one in a while.
43
43
*/
44
- public function gc ($ lifetime )
44
+ public function gc ($ lifetime ): int | false
45
45
{
46
46
$ this ->db ->query (
47
47
'DELETE FROM sso_session WHERE timestamp<$1 ' ,
@@ -55,7 +55,7 @@ public function gc($lifetime)
55
55
* Reads the session data from the database. If no data exists, creates an
56
56
* empty row.
57
57
*/
58
- public function read ($ id )
58
+ public function read ($ id ): string | false
59
59
{
60
60
if (empty ($ id )) {
61
61
return false ;
@@ -87,7 +87,7 @@ public function read($id)
87
87
/**
88
88
* Writes changes to the session data to the database.
89
89
*/
90
- public function write ($ id , $ data )
90
+ public function write ($ id , $ data ): bool
91
91
{
92
92
if (empty ($ id )) {
93
93
return false ;
@@ -107,7 +107,7 @@ public function write($id, $data)
107
107
/**
108
108
* Deletes the session entry from the database.
109
109
*/
110
- public function destroy ($ id )
110
+ public function destroy ($ id ): bool
111
111
{
112
112
if (empty ($ id )) {
113
113
return false ;
0 commit comments