Skip to content

Commit

Permalink
Merge pull request #395 from ildyria/fix-stream-filter-append
Browse files Browse the repository at this point in the history
stream_filter_append & stream_filter_prepend use mixed instead of array
  • Loading branch information
Kharhamel committed Oct 7, 2022
2 parents 0c5bae9 + 27c2f28 commit e788f3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generated/stream.php
Expand Up @@ -73,7 +73,7 @@ function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0):
* STREAM_FILTER_WRITE, and/or
* STREAM_FILTER_ALL can also be passed to the
* read_write parameter to override this behavior.
* @param array $params This filter will be added with the specified
* @param mixed $params This filter will be added with the specified
* params to the end of
* the list and will therefore be called last during stream operations.
* To add a filter to the beginning of the list, use
Expand All @@ -87,7 +87,7 @@ function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0):
* @throws StreamException
*
*/
function stream_filter_append($stream, string $filtername, int $read_write = null, array $params = null)
function stream_filter_append($stream, string $filtername, int $read_write = null, $params = null)
{
error_clear_last();
if ($params !== null) {
Expand Down Expand Up @@ -123,7 +123,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul
* read_write parameter to override this behavior.
* See stream_filter_append for an example of
* using this parameter.
* @param array $params This filter will be added with the specified params
* @param mixed $params This filter will be added with the specified params
* to the beginning of the list and will therefore be
* called first during stream operations. To add a filter to the end of the
* list, use stream_filter_append.
Expand All @@ -136,7 +136,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul
* @throws StreamException
*
*/
function stream_filter_prepend($stream, string $filtername, int $read_write = null, array $params = null)
function stream_filter_prepend($stream, string $filtername, int $read_write = null, $params = null)
{
error_clear_last();
if ($params !== null) {
Expand Down
2 changes: 2 additions & 0 deletions generator/config/CustomPhpStanFunctionMap.php
Expand Up @@ -38,4 +38,6 @@
'fgetcsv' => ['array|false|null', 'fp'=>'resource', 'length='=>'0|positive-int', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], //phpstan default return type is too hard to analyse
//todo: edit the reader to turn 0|1 into int
'preg_match' => ['int|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'string[]', 'flags='=>'int', 'offset='=>'int'], //int|false instead of 0|1|false
'stream_filter_prepend' => ['resource', 'stream' => 'resource', 'filtername' => 'string', 'read_write' => 'int', 'params' => 'mixed'], // params mixed instead of array
'stream_filter_append' => ['resource', 'stream' => 'resource', 'filtername' => 'string', 'read_write' => 'int', 'params' => 'mixed'], // params mixed instead of array
];

0 comments on commit e788f3d

Please sign in to comment.