Skip to content

Commit e63ea71

Browse files
committed
Review parameter names in ext/zlib
1 parent 9fbffe4 commit e63ea71

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

ext/zlib/tests/005.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ string(%d) "%a"
5353

5454
Warning: gzuncompress(): %s error in %s on line %d
5555
bool(false)
56-
gzuncompress(): Argument #2 ($max_decoded_len) must be greater than or equal to 0
56+
gzuncompress(): Argument #2 ($length) must be greater than or equal to 0
5757

5858
Warning: gzuncompress(): %s error in %s on line %d
5959
bool(false)

ext/zlib/tests/006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ bool(false)
5454

5555
Warning: gzinflate(): data error in %s on line %d
5656
bool(false)
57-
gzinflate(): Argument #2 ($max_decoded_len) must be greater than or equal to 0
57+
gzinflate(): Argument #2 ($length) must be greater than or equal to 0
5858

5959
Warning: gzinflate(): data error in %s on line %d
6060
bool(false)

ext/zlib/tests/deflate_add_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ try {
2828
?>
2929
--EXPECT--
3030
deflate_add(): Argument #1 ($context) must be of type DeflateContext, resource given
31-
deflate_add(): Argument #3 ($flush_behavior) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH
31+
deflate_add(): Argument #3 ($flush_mode) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH

ext/zlib/zlib.stub.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,93 +23,93 @@ function readgzfile(string $filename, int $use_include_path = 0): int|false {}
2323

2424
function zlib_encode(string $data, int $encoding, int $level = -1): string|false {}
2525

26-
function zlib_decode(string $data, int $max_decoded_len = 0): string|false {}
26+
function zlib_decode(string $data, int $length = 0): string|false {}
2727

2828
function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string|false {}
2929

3030
function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string|false {}
3131

3232
function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string|false {}
3333

34-
function gzinflate(string $data, int $max_decoded_len = 0): string|false {}
34+
function gzinflate(string $data, int $length = 0): string|false {}
3535

36-
function gzdecode(string $data, int $max_decoded_len = 0): string|false {}
36+
function gzdecode(string $data, int $length = 0): string|false {}
3737

38-
function gzuncompress(string $data, int $max_decoded_len = 0): string|false {}
38+
function gzuncompress(string $data, int $length = 0): string|false {}
3939

4040
/**
41-
* @param resource $fp
41+
* @param resource $stream
4242
* @alias fwrite
4343
*/
44-
function gzwrite($fp, string $str, ?int $length = null): int|false {}
44+
function gzwrite($stream, string $data, ?int $length = null): int|false {}
4545

4646
/**
47-
* @param resource $fp
47+
* @param resource $stream
4848
* @alias fwrite
4949
*/
50-
function gzputs($fp, string $str, ?int $length = null): int|false {}
50+
function gzputs($stream, string $data, ?int $length = null): int|false {}
5151

5252
/**
53-
* @param resource $fp
53+
* @param resource $stream
5454
* @alias rewind
5555
*/
56-
function gzrewind($fp): bool {}
56+
function gzrewind($stream): bool {}
5757

5858
/**
59-
* @param resource $fp
59+
* @param resource $stream
6060
* @alias fclose
6161
*/
62-
function gzclose($fp): bool {}
62+
function gzclose($stream): bool {}
6363

6464
/**
65-
* @param resource $fp
65+
* @param resource $stream
6666
* @alias feof
6767
*/
68-
function gzeof($fp): bool {}
68+
function gzeof($stream): bool {}
6969

7070
/**
71-
* @param resource $fp
71+
* @param resource $stream
7272
* @alias fgetc
7373
*/
74-
function gzgetc($fp): string|false {}
74+
function gzgetc($stream): string|false {}
7575

7676
/**
77-
* @param resource $fp
77+
* @param resource $stream
7878
* @alias fpassthru
7979
*/
80-
function gzpassthru($fp): int {}
80+
function gzpassthru($stream): int {}
8181

8282
/**
83-
* @param resource $fp
83+
* @param resource $stream
8484
* @alias fseek
8585
*/
86-
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {}
86+
function gzseek($stream, int $offset, int $whence = SEEK_SET): int {}
8787

8888
/**
89-
* @param resource $fp
89+
* @param resource $stream
9090
* @alias ftell
9191
*/
92-
function gztell($fp): int|false {}
92+
function gztell($stream): int|false {}
9393

9494
/**
95-
* @param resource $fp
95+
* @param resource $stream
9696
* @alias fread
9797
*/
98-
function gzread($fp, int $length): string|false {}
98+
function gzread($stream, int $length): string|false {}
9999

100100
/**
101-
* @param resource $fp
101+
* @param resource $stream
102102
* @alias fgets
103103
*/
104-
function gzgets($fp, int $length = 1024): string|false {}
104+
function gzgets($stream, int $length = 1024): string|false {}
105105

106106
function deflate_init(int $encoding, array $options = []): DeflateContext|false {}
107107

108-
function deflate_add(DeflateContext $context, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {}
108+
function deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
109109

110110
function inflate_init(int $encoding, array $options = []): InflateContext|false {}
111111

112-
function inflate_add(InflateContext $context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
112+
function inflate_add(InflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
113113

114114
function inflate_get_status(InflateContext $context): int {}
115115

ext/zlib/zlib_arginfo.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: b31cdbe9a5d719194753bfe303d32319478048bb */
2+
* Stub hash: 6c2ddfdc11cef747d9657ca4004cf10cf79ea337 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ob_gzhandler, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
@@ -33,7 +33,7 @@ ZEND_END_ARG_INFO()
3333

3434
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
3535
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
36-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_decoded_len, IS_LONG, 0, "0")
36+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
3737
ZEND_END_ARG_INFO()
3838

3939
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzdeflate, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
@@ -61,46 +61,46 @@ ZEND_END_ARG_INFO()
6161
#define arginfo_gzuncompress arginfo_zlib_decode
6262

6363
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
64-
ZEND_ARG_INFO(0, fp)
65-
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
64+
ZEND_ARG_INFO(0, stream)
65+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
6666
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
6767
ZEND_END_ARG_INFO()
6868

6969
#define arginfo_gzputs arginfo_gzwrite
7070

7171
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzrewind, 0, 1, _IS_BOOL, 0)
72-
ZEND_ARG_INFO(0, fp)
72+
ZEND_ARG_INFO(0, stream)
7373
ZEND_END_ARG_INFO()
7474

7575
#define arginfo_gzclose arginfo_gzrewind
7676

7777
#define arginfo_gzeof arginfo_gzrewind
7878

7979
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzgetc, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
80-
ZEND_ARG_INFO(0, fp)
80+
ZEND_ARG_INFO(0, stream)
8181
ZEND_END_ARG_INFO()
8282

8383
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzpassthru, 0, 1, IS_LONG, 0)
84-
ZEND_ARG_INFO(0, fp)
84+
ZEND_ARG_INFO(0, stream)
8585
ZEND_END_ARG_INFO()
8686

8787
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzseek, 0, 2, IS_LONG, 0)
88-
ZEND_ARG_INFO(0, fp)
88+
ZEND_ARG_INFO(0, stream)
8989
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
9090
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET")
9191
ZEND_END_ARG_INFO()
9292

9393
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gztell, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
94-
ZEND_ARG_INFO(0, fp)
94+
ZEND_ARG_INFO(0, stream)
9595
ZEND_END_ARG_INFO()
9696

9797
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
98-
ZEND_ARG_INFO(0, fp)
98+
ZEND_ARG_INFO(0, stream)
9999
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
100100
ZEND_END_ARG_INFO()
101101

102102
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
103-
ZEND_ARG_INFO(0, fp)
103+
ZEND_ARG_INFO(0, stream)
104104
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024")
105105
ZEND_END_ARG_INFO()
106106

@@ -111,8 +111,8 @@ ZEND_END_ARG_INFO()
111111

112112
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_deflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
113113
ZEND_ARG_OBJ_INFO(0, context, DeflateContext, 0)
114-
ZEND_ARG_TYPE_INFO(0, add, IS_STRING, 0)
115-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush_behavior, IS_LONG, 0, "ZLIB_SYNC_FLUSH")
114+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
115+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush_mode, IS_LONG, 0, "ZLIB_SYNC_FLUSH")
116116
ZEND_END_ARG_INFO()
117117

118118
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_inflate_init, 0, 1, InflateContext, MAY_BE_FALSE)
@@ -122,7 +122,7 @@ ZEND_END_ARG_INFO()
122122

123123
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
124124
ZEND_ARG_OBJ_INFO(0, context, InflateContext, 0)
125-
ZEND_ARG_TYPE_INFO(0, encoded_data, IS_STRING, 0)
125+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
126126
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush_mode, IS_LONG, 0, "ZLIB_SYNC_FLUSH")
127127
ZEND_END_ARG_INFO()
128128

0 commit comments

Comments
 (0)