1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Add an optional $options argument to hash functions for PHP 8.1

This commit is contained in:
50bhan 2021-09-07 01:44:35 +04:30
parent fce98d0d85
commit 58e1e6b9a3
2 changed files with 15 additions and 3 deletions

View File

@ -4347,17 +4347,17 @@ return [
'HaruPage::stroke' => ['bool', 'close_path='=>'bool'],
'HaruPage::textOut' => ['bool', 'x'=>'float', 'y'=>'float', 'text'=>'string'],
'HaruPage::textRect' => ['bool', 'left'=>'float', 'top'=>'float', 'right'=>'float', 'bottom'=>'float', 'text'=>'string', 'align='=>'int'],
'hash' => ['string|false', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool'],
'hash' => ['string|false', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool', 'options='=>'array'],
'hash_algos' => ['list<string>'],
'hash_copy' => ['HashContext', 'context'=>'HashContext'],
'hash_equals' => ['bool', 'known_string'=>'string', 'user_string'=>'string'],
'hash_file' => ['string|false', 'algo'=>'string', 'filename'=>'string', 'binary='=>'bool'],
'hash_file' => ['string|false', 'algo'=>'string', 'filename'=>'string', 'binary='=>'bool', 'options='=>'array'],
'hash_final' => ['string', 'context'=>'HashContext', 'binary='=>'bool'],
'hash_hkdf' => ['string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
'hash_hmac' => ['string|false', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'binary='=>'bool'],
'hash_hmac_algos' => ['list<string>'],
'hash_hmac_file' => ['string|false', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'binary='=>'bool'],
'hash_init' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],
'hash_init' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string', 'options='=>'array'],
'hash_pbkdf2' => ['string', 'algo'=>'string', 'password'=>'string', 'salt'=>'string', 'iterations'=>'int', 'length='=>'int', 'binary='=>'bool'],
'hash_update' => ['bool', 'context'=>'HashContext', 'data'=>'string'],
'hash_update_file' => ['bool', 'context'=>'HashContext', 'filename'=>'string', 'stream_context='=>'?resource'],

View File

@ -166,6 +166,18 @@ return [
'old' => ['mixed|false', 'ftp' => 'resource', 'option' => 'int'],
'new' => ['mixed|false', 'ftp' => 'FTP\Connection', 'option' => 'int'],
],
'hash' => [
'old' => ['string|false', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool'],
'new' => ['string|false', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool', 'options='=>'array'],
],
'hash_file' => [
'old' => ['string|false', 'algo'=>'string', 'filename'=>'string', 'binary='=>'bool'],
'new' => ['string|false', 'algo'=>'string', 'filename'=>'string', 'binary='=>'bool', 'options='=>'array'],
],
'hash_init' => [
'old' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],
'new' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string', 'options='=>'array'],
],
'mysqli_execute' => [
'old' => ['bool', 'statement' => 'mysqli_stmt'],
'new' => ['bool', 'statement' => 'mysqli_stmt', 'params=' => 'list<mixed>|null'],