Skip to content

Commit e9c7072

Browse files
committed
Review parameter names in ext/zlib
Closes GH-6250
1 parent faea5ab commit e9c7072

File tree

9 files changed

+56
-56
lines changed

9 files changed

+56
-56
lines changed

ext/bz2/bz2.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function bzread($bz, int $length = 1024): string|false {}
1515
* @param resource $bz
1616
* @alias fwrite
1717
*/
18-
function bzwrite($bz, string $str, ?int $length = null): int|false {}
18+
function bzwrite($bz, string $data, ?int $max_length = null): int|false {}
1919

2020
/**
2121
* @param resource $bz

ext/bz2/bz2_arginfo.h

Lines changed: 3 additions & 3 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: 9bcd75ddbde225e65ee9f00d86d16677d671b4e4 */
2+
* Stub hash: e18326d2ddbe564858abb531fc41b7907fba35c4 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzopen, 0, 0, 2)
55
ZEND_ARG_INFO(0, file)
@@ -13,8 +13,8 @@ ZEND_END_ARG_INFO()
1313

1414
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
1515
ZEND_ARG_INFO(0, bz)
16-
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
17-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
16+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
17+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null")
1818
ZEND_END_ARG_INFO()
1919

2020
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bzflush, 0, 1, _IS_BOOL, 0)

ext/standard/basic_functions.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -823,13 +823,13 @@ function ftell($stream): int|false {}
823823
function fflush($stream): bool {}
824824

825825
/** @param resource $stream */
826-
function fwrite($stream, string $string, ?int $max_length = null): int|false {}
826+
function fwrite($stream, string $data, ?int $max_length = null): int|false {}
827827

828828
/**
829829
* @param resource $stream
830830
* @alias fwrite
831831
*/
832-
function fputs($stream, string $string, ?int $max_length = null): int|false {}
832+
function fputs($stream, string $data, ?int $max_length = null): int|false {}
833833

834834
/** @param resource|null $context */
835835
function mkdir(string $directory, int $mode = 0777, bool $recursive = false, $context = null): bool {}
@@ -855,7 +855,7 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co
855855
function unlink(string $filename, $context = null): bool {}
856856

857857
/** @param resource|null $context */
858-
function file_put_contents(string $filename, mixed $content, int $flags = 0, $context = null): int|false {}
858+
function file_put_contents(string $filename, mixed $data, int $flags = 0, $context = null): int|false {}
859859

860860
/** @param resource $stream */
861861
function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): int|false {}

ext/standard/basic_functions_arginfo.h

Lines changed: 3 additions & 3 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: af5b921b66f7dd68ba8c771199825a439a07dba0 */
2+
* Stub hash: 1b9d82b77bd589dc95f5f4db1780162ee92c89c6 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -1267,7 +1267,7 @@ ZEND_END_ARG_INFO()
12671267

12681268
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
12691269
ZEND_ARG_INFO(0, stream)
1270-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
1270+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
12711271
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null")
12721272
ZEND_END_ARG_INFO()
12731273

@@ -1317,7 +1317,7 @@ ZEND_END_ARG_INFO()
13171317

13181318
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file_put_contents, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
13191319
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
1320-
ZEND_ARG_TYPE_INFO(0, content, IS_MIXED, 0)
1320+
ZEND_ARG_TYPE_INFO(0, data, IS_MIXED, 0)
13211321
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
13221322
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
13231323
ZEND_END_ARG_INFO()

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 ($max_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 ($max_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 $max_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 $max_length = 0): string|false {}
3535

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

38-
function gzuncompress(string $data, int $max_decoded_len = 0): string|false {}
38+
function gzuncompress(string $data, int $max_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 $max_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 $max_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: 15 additions & 15 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: e9347c139d418c36d889d2becf57535f1c76efed */
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, max_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)
66-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
64+
ZEND_ARG_INFO(0, stream)
65+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
66+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_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)