|
16 | 16 | use CodeIgniter\I18n\Time; |
17 | 17 | use CodeIgniter\Session\Exceptions\SessionException; |
18 | 18 | use Config\Session as SessionConfig; |
19 | | -use ReturnTypeWillChange; |
20 | 19 |
|
21 | 20 | /** |
22 | 21 | * Session handler using file system for storage. |
@@ -115,12 +114,8 @@ public function open($path, $name): bool |
115 | 114 | * Reads the session data from the session storage, and returns the results. |
116 | 115 | * |
117 | 116 | * @param string $id The session ID. |
118 | | - * |
119 | | - * @return false|string Returns an encoded string of the read data. |
120 | | - * If nothing was read, it must return false. |
121 | 117 | */ |
122 | | - #[ReturnTypeWillChange] |
123 | | - public function read($id) |
| 118 | + public function read($id): false|string |
124 | 119 | { |
125 | 120 | // This might seem weird, but PHP 5.6 introduced session_reset(), |
126 | 121 | // which re-reads session data |
@@ -267,11 +262,8 @@ public function destroy($id): bool |
267 | 262 | * |
268 | 263 | * @param int $max_lifetime Sessions that have not updated |
269 | 264 | * for the last max_lifetime seconds will be removed. |
270 | | - * |
271 | | - * @return false|int Returns the number of deleted sessions on success, or false on failure. |
272 | 265 | */ |
273 | | - #[ReturnTypeWillChange] |
274 | | - public function gc($max_lifetime) |
| 266 | + public function gc($max_lifetime): false|int |
275 | 267 | { |
276 | 268 | if (! is_dir($this->savePath) || ($directory = opendir($this->savePath)) === false) { |
277 | 269 | $this->logger->debug("Session: Garbage collector couldn't list files under directory '" . $this->savePath . "'."); |
|
0 commit comments