Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream_filter_append & stream_filter_prepend use mixed instead of array #395

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions generated/stream.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
];