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

Mark hash functions as non-false

See https://github.com/php/php-src/issues/7759 and PR https://github.com/phpstan/phpstan-src/pull/822/files#
This commit is contained in:
Alies Lapatsin 2022-10-09 17:49:17 +04:00 committed by GitHub
parent 52e96bea38
commit dec8d0edc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,6 +381,14 @@ return [
'old' => ['string|false', 'format'=>'string', 'timestamp='=>'int'],
'new' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'],
],
'hash' => [
'old' => ['string|false', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool'],
'new' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool', 'options='=>'array'],
],
'hash_hmac' => [
'old' => ['string|false', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'binary='=>'bool'],
'new' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'binary='=>'bool'],
],
'hash_init' => [
'old' => ['HashContext|false', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],
'new' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],