Skip to content

Commit 7002950

Browse files
Firehedclaude
andauthored
Fix the return type of SessionHandler::read() to string|false (#6639)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 38ec2fc commit 7002950

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎resources/functionMap.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9222,7 +9222,7 @@
92229222
'SessionHandler::destroy' => ['bool', 'id'=>'string'],
92239223
'SessionHandler::gc' => ['int|false', 'maxlifetime'=>'int'],
92249224
'SessionHandler::open' => ['bool', 'save_path'=>'string', 'session_name'=>'string'],
9225-
'SessionHandler::read' => ['string', 'id'=>'string'],
9225+
'SessionHandler::read' => ['string|false', 'id'=>'string'],
92269226
'SessionHandler::updateTimestamp' => ['bool', 'session_id'=>'string', 'session_data'=>'string'],
92279227
'SessionHandler::validateId' => ['bool', 'session_id'=>'string'],
92289228
'SessionHandler::write' => ['bool', 'id'=>'string', 'data'=>'string'],
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace SessionHandlerRead;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
function (\SessionHandler $handler, \SessionHandlerInterface $interface): void {
8+
assertType('string|false', $handler->read('id'));
9+
assertType('string|false', $interface->read('id'));
10+
};

0 commit comments

Comments
 (0)