Skip to content

Commit

Permalink
Merge pull request #8217 from othercorey/fix-callmap-funcs
Browse files Browse the repository at this point in the history
Fix several CallMap function signatures
  • Loading branch information
orklah committed Jul 6, 2022
2 parents 38443ef + e0ebfe1 commit e28cd12
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 15 deletions.
12 changes: 6 additions & 6 deletions dictionaries/CallMap.php
Expand Up @@ -1543,7 +1543,7 @@
'Couchbase\WildcardSearchQuery::jsonSerialize' => ['array'],
'Couchbase\zlibCompress' => ['string', 'data'=>'string'],
'Couchbase\zlibDecompress' => ['string', 'data'=>'string'],
'count' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'],
'count' => ['int', 'value'=>'Countable|array', 'mode='=>'int'],
'count_chars' => ['array<int,int>', 'input'=>'string', 'mode='=>'0|1|2'],
'count_chars\'1' => ['string', 'input'=>'string', 'mode='=>'3|4'],
'Countable::count' => ['int'],
Expand Down Expand Up @@ -2520,7 +2520,7 @@
'enchant_dict_store_replacement' => ['void', 'dictionary'=>'resource', 'misspelled'=>'string', 'correct'=>'string'],
'enchant_dict_suggest' => ['array', 'dictionary'=>'resource', 'word'=>'string'],
'end' => ['mixed|false', '&r_array'=>'array|object'],
'enum_exists' => ['bool', 'class' => 'class-string', 'autoload=' => 'bool'],
'enum_exists' => ['bool', 'enum' => 'class-string', 'autoload=' => 'bool'],
'Error::__clone' => ['void'],
'Error::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?Error'],
'Error::__toString' => ['string'],
Expand Down Expand Up @@ -2926,7 +2926,7 @@
'explode' => ['list<string>', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'],
'expm1' => ['float', 'num'=>'float'],
'extension_loaded' => ['bool', 'extension'=>'string'],
'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'?string'],
'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'string'],
'ezmlm_hash' => ['int', 'addr'=>'string'],
'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
'fam_close' => ['void', 'fam'=>'resource'],
Expand Down Expand Up @@ -3323,7 +3323,7 @@
'fpassthru' => ['int|false', 'stream'=>'resource'],
'fpm_get_status' => ['array|false'],
'fprintf' => ['int', 'stream'=>'resource', 'format'=>'string', '...values='=>'string|int|float'],
'fputcsv' => ['int|false', 'stream'=>'resource', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'fputcsv' => ['int|false', 'stream'=>'resource', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'],
'fputs' => ['int|false', 'stream'=>'resource', 'data'=>'string', 'length='=>'int'],
'fread' => ['string|false', 'stream'=>'resource', 'length'=>'int'],
'frenchtojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
Expand Down Expand Up @@ -3723,7 +3723,7 @@
'get_called_class' => ['class-string'],
'get_cfg_var' => ['string|false', 'option'=>'string'],
'get_class' => ['class-string', 'object='=>'object'],
'get_class_methods' => ['list<string>|null', 'object_or_class'=>'mixed'],
'get_class_methods' => ['list<string>', 'object_or_class'=>'object|class-string'],
'get_class_vars' => ['array<string,mixed>', 'class'=>'string'],
'get_current_user' => ['string'],
'get_debug_type' => ['string', 'value'=>'mixed'],
Expand All @@ -3743,7 +3743,7 @@
'get_magic_quotes_runtime' => ['int|false'],
'get_meta_tags' => ['array', 'filename'=>'string', 'use_include_path='=>'bool'],
'get_object_vars' => ['array<string,mixed>', 'object'=>'object'],
'get_parent_class' => ['class-string|false', 'object_or_class='=>'mixed'],
'get_parent_class' => ['class-string|false', 'object_or_class='=>'object|class-string'],
'get_required_files' => ['list<string>'],
'get_resource_id' => ['int', 'resource'=>'resource'],
'get_resource_type' => ['string', 'resource'=>'resource'],
Expand Down
12 changes: 12 additions & 0 deletions dictionaries/CallMap_80_delta.php
Expand Up @@ -213,6 +213,10 @@
'old' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'bool'],
'new' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'true'],
],
'count' => [
'old' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'],
'new' => ['int', 'value'=>'Countable|array', 'mode='=>'int'],
],
'count_chars' => [
'old' => ['array<int,int>|false', 'input'=>'string', 'mode='=>'0|1|2'],
'new' => ['array<int,int>', 'input'=>'string', 'mode='=>'0|1|2'],
Expand Down Expand Up @@ -353,6 +357,14 @@
'old' => ['list<string>|false', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'],
'new' => ['list<string>', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'],
],
'get_class_methods' => [
'old' => ['list<string>|null', 'object_or_class'=>'mixed'],
'new' => ['list<string>', 'object_or_class'=>'object|class-string'],
],
'get_parent_class' => [
'old' => ['class-string|false', 'object_or_class='=>'mixed'],
'new' => ['class-string|false', 'object_or_class='=>'object|class-string'],
],
'gmdate' => [
'old' => ['string', 'format'=>'string', 'timestamp='=>'int'],
'new' => ['string', 'format'=>'string', 'timestamp='=>'int|null'],
Expand Down
6 changes: 5 additions & 1 deletion dictionaries/CallMap_81_delta.php
Expand Up @@ -17,7 +17,7 @@
return [
'added' => [
'array_is_list' => ['bool', 'array' => 'array'],
'enum_exists' => ['bool', 'class' => 'class-string', 'autoload=' => 'bool'],
'enum_exists' => ['bool', 'enum' => 'class-string', 'autoload=' => 'bool'],
'fsync' => ['bool', 'stream' => 'resource'],
'fdatasync' => ['bool', 'stream' => 'resource'],
'imageavif' => ['bool', 'image'=>'GdImage', 'file='=>'resource|string|null', 'quality='=>'int', 'speed='=>'int'],
Expand Down Expand Up @@ -73,6 +73,10 @@
'old' => ['bool', 'finfo'=>'resource', 'flags'=>'int'],
'new' => ['bool', 'finfo'=>'finfo', 'flags'=>'int'],
],
'fputcsv' => [
'old' => ['int|false', 'stream'=>'resource', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'new' => ['int|false', 'stream'=>'resource', 'fields'=>'array<array-key, null|scalar|Stringable>', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string', 'eol='=>'string'],
],
'ftp_connect' => [
'old' => ['resource|false', 'hostname' => 'string', 'port=' => 'int', 'timeout=' => 'int'],
'new' => ['FTP\Connection|false', 'hostname' => 'string', 'port=' => 'int', 'timeout=' => 'int'],
Expand Down
2 changes: 1 addition & 1 deletion dictionaries/CallMap_historical.php
Expand Up @@ -10544,7 +10544,7 @@
'explode' => ['list<string>|false', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'],
'expm1' => ['float', 'num'=>'float'],
'extension_loaded' => ['bool', 'extension'=>'string'],
'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'?string'],
'extract' => ['int', '&rw_array'=>'array', 'flags='=>'int', 'prefix='=>'string'],
'ezmlm_hash' => ['int', 'addr'=>'string'],
'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
'fam_close' => ['void', 'fam'=>'resource'],
Expand Down
7 changes: 0 additions & 7 deletions tests/Internal/Codebase/InternalCallMapHandlerTest.php
Expand Up @@ -55,7 +55,6 @@ class InternalCallMapHandlerTest extends TestCase
'bcmod',
'bcpowmod',
'bzdecompress',
'count',
'crypt',
'date_isodate_set',
'debug_zval_dump',
Expand All @@ -82,13 +81,7 @@ class InternalCallMapHandlerTest extends TestCase
'enchant_dict_quick_check',
'enchant_dict_store_replacement',
'enchant_dict_suggest',
'enum_exists',
'extract',
// https://www.php.net/manual/en/function.fputcsv.php
'fputcsv' => ['8.1'],
'get_class_methods',
'get_headers',
'get_parent_class',
'gmp_clrbit',
'gmp_div',
'gmp_setbit',
Expand Down

0 comments on commit e28cd12

Please sign in to comment.