@@ -290,7 +290,7 @@ public function getOverrideLifetime()
290290 * @param string $name
291291 * @return boolean
292292 */
293- public function open ($ save_path , $ name )
293+ public function open (string $ save_path , string $ name ): bool
294294 {
295295 $ this ->_sessionSavePath = $ save_path ;
296296 $ this ->_sessionName = $ name ;
@@ -303,7 +303,7 @@ public function open($save_path, $name)
303303 *
304304 * @return boolean
305305 */
306- public function close ()
306+ public function close (): bool
307307 {
308308 return true ;
309309 }
@@ -314,7 +314,7 @@ public function close()
314314 * @param string $id
315315 * @return string
316316 */
317- public function read ($ id )
317+ public function read (string $ id ): string
318318 {
319319 $ return = '' ;
320320
@@ -338,7 +338,7 @@ public function read($id)
338338 * @param string $data
339339 * @return boolean
340340 */
341- public function write ($ id , $ data )
341+ public function write (string $ id , string $ data ): bool
342342 {
343343 $ data = [$ this ->_modifiedColumn => time (),
344344 $ this ->_dataColumn => (string ) $ data ];
@@ -366,7 +366,7 @@ public function write($id, $data)
366366 * @param string $id
367367 * @return boolean
368368 */
369- public function destroy ($ id )
369+ public function destroy ($ id ): bool
370370 {
371371 $ this ->delete ($ this ->_getPrimary ($ id , self ::PRIMARY_TYPE_WHERECLAUSE ));
372372 return true ; //always return true, since if nothing can be deleted, it is already deleted and thats OK.
@@ -378,13 +378,11 @@ public function destroy($id)
378378 * @param int $maxlifetime
379379 * @return true
380380 */
381- public function gc ($ maxlifetime )
381+ public function gc (int $ maxlifetime ): int
382382 {
383- $ this ->delete ($ this ->getAdapter ()->quoteIdentifier ($ this ->_modifiedColumn , true ) . ' + '
384- . $ this ->getAdapter ()->quoteIdentifier ($ this ->_lifetimeColumn , true ) . ' < '
385- . $ this ->getAdapter ()->quote (time ()));
386-
387- return true ;
383+ return $ this ->delete ($ this ->getAdapter ()->quoteIdentifier ($ this ->_modifiedColumn , true ) . ' + '
384+ . $ this ->getAdapter ()->quoteIdentifier ($ this ->_lifetimeColumn , true ) . ' < '
385+ . $ this ->getAdapter ()->quote (time ()));
388386 }
389387
390388 /**
0 commit comments