Skip to content

Commit ef31697

Browse files
committed
Address review comments
1 parent 72d3f0c commit ef31697

File tree

8 files changed

+17
-26
lines changed

8 files changed

+17
-26
lines changed

Zend/Optimizer/zend_func_infos.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const func_info_t func_infos[] = {
6262
F1("timezone_open", MAY_BE_OBJECT|MAY_BE_FALSE),
6363
F1("timezone_name_get", MAY_BE_STRING),
6464
F1("timezone_name_from_abbr", MAY_BE_STRING|MAY_BE_FALSE),
65-
F1("timezone_transitions_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
65+
F1("timezone_transitions_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE),
6666
F1("timezone_location_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
6767
F1("timezone_identifiers_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
6868
F1("timezone_abbreviations_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY),
@@ -82,7 +82,7 @@ static const func_info_t func_infos[] = {
8282
F1("finfo_file", MAY_BE_STRING|MAY_BE_FALSE),
8383
F1("finfo_buffer", MAY_BE_STRING|MAY_BE_FALSE),
8484
F1("mime_content_type", MAY_BE_STRING|MAY_BE_FALSE),
85-
F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE|MAY_BE_NULL),
85+
F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
8686
F1("filter_var_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
8787
F1("filter_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
8888
F1("gd_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_FALSE|MAY_BE_ARRAY_OF_TRUE),
@@ -196,7 +196,7 @@ static const func_info_t func_infos[] = {
196196
F1("mb_substr", MAY_BE_STRING),
197197
F1("mb_strcut", MAY_BE_STRING),
198198
F1("mb_strimwidth", MAY_BE_STRING),
199-
F1("mb_convert_encoding", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_STRING|MAY_BE_FALSE),
199+
F1("mb_convert_encoding", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_STRING|MAY_BE_FALSE),
200200
F1("mb_convert_case", MAY_BE_STRING),
201201
F1("mb_strtoupper", MAY_BE_STRING),
202202
F1("mb_strtolower", MAY_BE_STRING),
@@ -249,13 +249,13 @@ static const func_info_t func_infos[] = {
249249
F1("mysqli_fetch_fields", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_OBJECT),
250250
F1("mysqli_fetch_field_direct", MAY_BE_OBJECT|MAY_BE_FALSE),
251251
F1("mysqli_fetch_lengths", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_FALSE),
252-
F1("mysqli_fetch_all", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY),
253-
F1("mysqli_fetch_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_NULL|MAY_BE_FALSE),
254-
F1("mysqli_fetch_assoc", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_NULL|MAY_BE_FALSE),
252+
F1("mysqli_fetch_all", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
253+
F1("mysqli_fetch_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_NULL|MAY_BE_FALSE),
254+
F1("mysqli_fetch_assoc", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_NULL|MAY_BE_FALSE),
255255
F1("mysqli_fetch_object", MAY_BE_OBJECT|MAY_BE_NULL|MAY_BE_FALSE),
256256
F1("mysqli_fetch_row", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ANY|MAY_BE_NULL|MAY_BE_FALSE),
257257
#if defined(MYSQLI_USE_MYSQLND)
258-
F1("mysqli_get_connection_stats", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY),
258+
F1("mysqli_get_connection_stats", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
259259
#endif
260260
#if defined(MYSQLI_USE_MYSQLND)
261261
F1("mysqli_get_client_stats", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
@@ -367,7 +367,7 @@ static const func_info_t func_infos[] = {
367367
F1("pg_result_error_field", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
368368
F1("pg_get_result", MAY_BE_OBJECT|MAY_BE_FALSE),
369369
F1("pg_result_status", MAY_BE_STRING|MAY_BE_LONG),
370-
F1("pg_get_notify", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
370+
F1("pg_get_notify", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE),
371371
F1("pg_socket", MAY_BE_RESOURCE|MAY_BE_FALSE),
372372
F1("pg_meta_data", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
373373
F1("pg_convert", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),

build/gen_stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ArrayType extends SimpleType {
122122

123123
public static function createGenericArray(): self
124124
{
125-
return new ArrayType(Type::fromString("int|string"), Type::fromString("mixed"));
125+
return new ArrayType(Type::fromString("int|string"), Type::fromString("mixed|ref"));
126126
}
127127

128128
public function __construct(Type $keyType, Type $valueType)
@@ -2047,9 +2047,9 @@ public function getType(): string {
20472047
$matches = [];
20482048

20492049
if ($this->name === "param") {
2050-
preg_match('/^\s*([\w\|\\\\\[\]<>,\- ]+)\s*\$\w+.*$/', $value, $matches);
2050+
preg_match('/^\s*([\w\|\\\\\[\]<>, ]+)\s*\$\w+.*$/', $value, $matches);
20512051
} elseif ($this->name === "return") {
2052-
preg_match('/^\s*([\w\|\\\\\[\]<>,\- ]+)(\s+|$)/', $value, $matches);
2052+
preg_match('/^\s*([\w\|\\\\\[\]<>, ]+)(\s+|$)/', $value, $matches);
20532053
}
20542054

20552055
if (!isset($matches[1])) {

ext/filter/filter.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $optio
1111
/** @refcount 1 */
1212
function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}
1313

14-
/**
15-
* @return array<int|string, mixed|ref>|false|null
16-
* @refcount 1
17-
*/
14+
/** @refcount 1 */
1815
function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}
1916

2017
/**

ext/filter/filter_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 34a64a7c42c7129146fac699c801fe0257fe0d6f */
2+
* Stub hash: 7623236b3b620e6a0e9f06615334392ab0bfce14 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)

ext/pcre/php_pcre.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ function preg_split(string $pattern, string $subject, int $limit = -1, int $flag
3737

3838
function preg_quote(string $str, ?string $delimiter = null): string {}
3939

40-
/**
41-
* @return array<int|string, mixed|ref>|false
42-
* @refcount 1
43-
*/
40+
/** @refcount 1 */
4441
function preg_grep(string $pattern, array $array, int $flags = 0): array|false {}
4542

4643
function preg_last_error(): int {}

ext/pcre/php_pcre_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 18ea8e0fc49c4daab52d346ba68afc77cc3f1552 */
2+
* Stub hash: 62ab532c890b5421bfe8b784c803829cf71a1423 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)

ext/spl/php_spl.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,5 @@ function iterator_apply(Traversable $iterator, callable $callback, ?array $args
5050

5151
function iterator_count(Traversable $iterator): int {}
5252

53-
/**
54-
* @return array<int|string, mixed|ref>
55-
* @refcount 1
56-
*/
53+
/** @refcount 1 */
5754
function iterator_to_array(Traversable $iterator, bool $preserve_keys = true): array {}

ext/spl/php_spl_arginfo.h

Lines changed: 1 addition & 1 deletion
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: a3102a82fa37455c2a5941b6e4f56204baa43950 */
2+
* Stub hash: 7359e9e5aa07c00d0e0be2642f11c1131a17e61e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_implements, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
55
ZEND_ARG_INFO(0, object_or_class)

0 commit comments

Comments
 (0)