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

Fix signatures of stream_filter_append and stream_filter_prepend (#3514)

filterparams is not restricted to an array, it is perfectly to pass a
class or any other value.

See https://github.com/php/php-src/blob/php-7.4.6/ext/standard/streamsfuncs.c#L1171
This commit is contained in:
LeSuisse 2020-06-03 18:50:40 +02:00 committed by GitHub
parent 7caaa64825
commit 1f8dc26d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13702,8 +13702,8 @@ return [
'stream_context_set_params' => ['bool', 'context'=>'resource', 'options'=>'array'],
'stream_copy_to_stream' => ['int|false', 'source'=>'resource', 'dest'=>'resource', 'maxlen='=>'int', 'pos='=>'int'],
'stream_encoding' => ['bool', 'stream'=>'resource', 'encoding='=>'string'],
'stream_filter_append' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'array'],
'stream_filter_prepend' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'array'],
'stream_filter_append' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'mixed'],
'stream_filter_prepend' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'mixed'],
'stream_filter_register' => ['bool', 'filtername'=>'string', 'classname'=>'string'],
'stream_filter_remove' => ['bool', 'stream_filter'=>'resource'],
'stream_get_contents' => ['string|false', 'source'=>'resource', 'maxlen='=>'int', 'offset='=>'int'],