@@ -223,7 +223,7 @@ public function testOpenThrowsForInvalidSavePath(): void
223223 $ handler = $ this ->getInstance ();
224224
225225 $ this ->expectException (SessionException::class);
226- $ this ->withSuppressedErrors (fn () => $ handler ->open ($ this ->tempPath . '/blocker/sub ' , $ this ->sessionName ));
226+ $ this ->withSuppressedErrors (fn (): bool => $ handler ->open ($ this ->tempPath . '/blocker/sub ' , $ this ->sessionName ));
227227 }
228228
229229 public function testOpenThrowsForWriteProtectedSavePath (): void
@@ -300,7 +300,7 @@ public function testReadFailsWhenFileCannotBeOpened(): void
300300 $ id = self ::sessionId ('4 ' );
301301 mkdir ($ this ->tempPath . '/ ' . $ this ->sessionName . $ id , 0700 , true );
302302
303- $ result = $ this ->withSuppressedErrors (static fn () => $ handler ->read ($ id ));
303+ $ result = $ this ->withSuppressedErrors (static fn (): string | false => $ handler ->read ($ id ));
304304
305305 $ this ->assertFalse ($ result );
306306 $ this ->assertLogContains ('error ' , 'Session: Unable to open file ' );
@@ -526,7 +526,7 @@ public function testGCWhenDirectoryCannotBeOpened(): void
526526 try {
527527 $ handler = $ this ->getInstance (['savePath ' => $ dir ]);
528528
529- $ result = $ this ->withSuppressedErrors (static fn () => $ handler ->gc (3600 ));
529+ $ result = $ this ->withSuppressedErrors (static fn (): int | false => $ handler ->gc (3600 ));
530530
531531 $ this ->assertFalse ($ result );
532532 $ this ->assertLogContains ('debug ' , "Session: Garbage collector couldn't list files under directory " );
0 commit comments