Skip to content

Commit bcf0669

Browse files
committed
[phpstorm-stubs] Support array|object for options in deflate_init and inflate_init functions
1 parent c20514d commit bcf0669

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zlib/zlib.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ function ob_gzhandler(string $data, int $flags): string|false {}
415415
* @param int $encoding <p>
416416
* One of the <b>ZLIB_ENCODING_*</b> constants.
417417
* </p>
418-
* @param array $options <p>
418+
* @param array|object $options <p>
419419
* An associative array which may contain the following elements:
420420
* <b>level</b>The compression level in range -1..9; defaults to -1.
421421
* <b>memory</b>The compression memory level in range 1..9; defaults to 8.
@@ -432,7 +432,7 @@ function ob_gzhandler(string $data, int $flags): string|false {}
432432
*/
433433
#[Pure]
434434
#[LanguageLevelTypeAware(["8.0" => "DeflateContext|false"], default: "resource|false")]
435-
function deflate_init(int $encoding, array $options = []) {}
435+
function deflate_init(int $encoding, #[LanguageLevelTypeAware(["8.3" => "array|object"], default: "array")] $options = []) {}
436436

437437
/**
438438
* Incrementally deflate data
@@ -463,7 +463,7 @@ function deflate_add(#[LanguageLevelTypeAware(["8.0" => "DeflateContext"], defau
463463
* @param int $encoding <p>
464464
* One of the ZLIB_ENCODING_* constants.
465465
* </p>
466-
* @param array $options [optional] <p>
466+
* @param array|object $options [optional] <p>
467467
* An associative array which may contain the following elements:
468468
* <b>level</b>The compression level in range -1..9; defaults to -1.
469469
* <b>memory</b>The compression memory level in range 1..9; defaults to 8.
@@ -480,7 +480,7 @@ function deflate_add(#[LanguageLevelTypeAware(["8.0" => "DeflateContext"], defau
480480
*/
481481
#[Pure]
482482
#[LanguageLevelTypeAware(["8.0" => "InflateContext|false"], default: "resource|false")]
483-
function inflate_init(int $encoding, array $options = []) {}
483+
function inflate_init(int $encoding, #[LanguageLevelTypeAware(["8.3" => "array|object"], default: "array")] $options = []) {}
484484

485485
/**
486486
* Incrementally inflate encoded data

0 commit comments

Comments
 (0)