Skip to content

Commit

Permalink
Merge pull request #9122 from othercorey/fix-returns
Browse files Browse the repository at this point in the history
Fix remaining ignored CallMap return types that can be updated
  • Loading branch information
orklah authored Jan 18, 2023
2 parents b6bdc94 + cfaf763 commit 466ff68
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 223 deletions.
142 changes: 71 additions & 71 deletions dictionaries/CallMap.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dictionaries/CallMap_74_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
'old' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'string'],
'new' => ['?string', 'languageTag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'defaultLocale='=>'?string'],
],
'openssl_random_pseudo_bytes' => [
'old' => ['string|false', 'length'=>'int', '&w_strong_result='=>'bool'],
'new' => ['string', 'length'=>'int', '&w_strong_result='=>'bool'],
],
'password_hash' => [
'old' => ['string|false', 'password'=>'string', 'algo'=>'int', 'options='=>'array'],
'new' => ['string|false', 'password'=>'string', 'algo'=>'int|string|null', 'options='=>'array'],
Expand Down
68 changes: 54 additions & 14 deletions dictionaries/CallMap_80_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'added' => [
'DateTime::createFromInterface' => ['static', 'object'=>'DateTimeInterface'],
'DateTimeImmutable::createFromInterface' => ['static', 'object'=>'DateTimeInterface'],
'PhpToken::getTokenName' => ['string'],
'PhpToken::getTokenName' => ['?string'],
'PhpToken::is' => ['bool', 'kind'=>'string|int|string[]|int[]'],
'PhpToken::isIgnorable' => ['bool'],
'PhpToken::tokenize' => ['list<PhpToken>', 'code'=>'string', 'flags='=>'int'],
Expand Down Expand Up @@ -214,8 +214,8 @@
'new' => ['?Phar', 'format='=>'?int', 'compression='=>'?int', 'extension='=>'?string'],
],
'PharData::decompress' => [
'old' => ['PharData', 'extension='=>'string'],
'new' => ['PharData', 'extension='=>'?string'],
'old' => ['?PharData', 'extension='=>'string'],
'new' => ['?PharData', 'extension='=>'?string'],
],
'Phar::compress' => [
'old' => ['?Phar', 'compression'=>'int', 'extension='=>'string'],
Expand Down Expand Up @@ -305,6 +305,14 @@
'old' => ['?string', 'request'=>'string', 'location'=>'string', 'action'=>'string', 'version'=>'int', 'one_way='=>'int'],
'new' => ['?string', 'request'=>'string', 'location'=>'string', 'action'=>'string', 'version'=>'int', 'one_way='=>'bool'],
],
'SplFileObject::fgets' => [
'old' => ['string|false'],
'new' => ['string'],
],
'SplFileObject::getCurrentLine' => [
'old' => ['string|false'],
'new' => ['string'],
],
'XMLWriter::startAttributeNs' => [
'old' => ['bool', 'prefix'=>'string', 'name'=>'string', 'namespace'=>'?string'],
'new' => ['bool', 'prefix'=>'?string', 'name'=>'string', 'namespace'=>'?string'],
Expand Down Expand Up @@ -1063,7 +1071,7 @@
],
'imageinterlace' => [
'old' => ['int|false', 'image'=>'resource', 'enable='=>'int'],
'new' => ['int|bool', 'image'=>'GdImage', 'enable='=>'bool|null'],
'new' => ['bool', 'image'=>'GdImage', 'enable='=>'bool|null'],
],
'imageistruecolor' => [
'old' => ['bool', 'image'=>'resource'],
Expand Down Expand Up @@ -1158,12 +1166,12 @@
'new' => ['bool', 'image'=>'GdImage', 'font'=>'int', 'x'=>'int', 'y'=>'int', 'string'=>'string', 'color'=>'int'],
],
'imagesx' => [
'old' => ['int|false', 'image'=>'resource'],
'new' => ['int|false', 'image'=>'GdImage'],
'old' => ['int', 'image'=>'resource'],
'new' => ['int', 'image'=>'GdImage'],
],
'imagesy' => [
'old' => ['int|false', 'image'=>'resource'],
'new' => ['int|false', 'image'=>'GdImage'],
'old' => ['int', 'image'=>'resource'],
'new' => ['int', 'image'=>'GdImage'],
],
'imagetruecolortopalette' => [
'old' => ['bool', 'image'=>'resource', 'dither'=>'bool', 'num_colors'=>'int'],
Expand Down Expand Up @@ -1197,6 +1205,14 @@
'old' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string', 'cc='=>'string', 'bcc='=>'string', 'return_path='=>'string'],
'new' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'?string', 'cc='=>'?string', 'bcc='=>'?string', 'return_path='=>'?string'],
],
'inflate_init' => [
'old' => ['resource|false', 'encoding'=>'int', 'options='=>'array'],
'new' => ['InflateContext|false', 'encoding'=>'int', 'options='=>'array'],
],
'jdtounix' => [
'old' => ['int|false', 'julian_day'=>'int'],
'new' => ['int', 'julian_day'=>'int'],
],
'ldap_add' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'array'],
'new' => ['bool', 'ldap'=>'resource', 'dn'=>'string', 'entry'=>'array', 'controls='=>'?array'],
Expand Down Expand Up @@ -1313,6 +1329,10 @@
'old' => ['string', 'string'=>'string', 'map'=>'array', 'encoding='=>'string', 'hex='=>'bool'],
'new' => ['string', 'string'=>'string', 'map'=>'array', 'encoding='=>'string|null', 'hex='=>'bool'],
],
'mb_encoding_aliases' => [
'old' => ['list<string>|false', 'encoding'=>'string'],
'new' => ['list<string>', 'encoding'=>'string'],
],
'mb_ereg' => [
'old' => ['int|false', 'pattern'=>'string', 'string'=>'string', '&w_matches='=>'array|null'],
'new' => ['bool', 'pattern'=>'string', 'string'=>'string', '&w_matches='=>'array|null'],
Expand Down Expand Up @@ -1465,6 +1485,10 @@
'old' => ['int', 'haystack'=>'string', 'needle'=>'string', 'encoding='=>'string'],
'new' => ['int', 'haystack'=>'string', 'needle'=>'string', 'encoding='=>'string|null'],
],
'metaphone' => [
'old' => ['string|false', 'string'=>'string', 'max_phonemes='=>'int'],
'new' => ['string', 'string'=>'string', 'max_phonemes='=>'int'],
],
'mhash' => [
'old' => ['string', 'algo'=>'int', 'data'=>'string', 'key='=>'string'],
'new' => ['string', 'algo'=>'int', 'data'=>'string', 'key='=>'?string'],
Expand All @@ -1473,6 +1497,10 @@
'old' => ['int|false', 'hour='=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
'new' => ['int|false', 'hour'=>'int', 'minute='=>'int|null', 'second='=>'int|null', 'month='=>'int|null', 'day='=>'int|null', 'year='=>'int|null'],
],
'msg_get_queue' => [
'old' => ['resource|false', 'key'=>'int', 'permissions='=>'int'],
'new' => ['SysvMessageQueue|false', 'key'=>'int', 'permissions='=>'int'],
],
'mysqli::__construct' => [
'old' => ['void', 'hostname='=>'string', 'username='=>'string', 'password='=>'string', 'database='=>'string', 'port='=>'int', 'socket='=>'string'],
'new' => ['void', 'hostname='=>'string|null', 'username='=>'string|null', 'password='=>'string|null', 'database='=>'string|null', 'port='=>'int|null', 'socket='=>'string|null'],
Expand Down Expand Up @@ -1705,6 +1733,10 @@
'old' => ['int', 'certificate'=>'string|resource', 'public_key'=>'string|array|resource'],
'new' => ['int', 'certificate'=>'string|OpenSSLCertificate', 'public_key'=>'string|OpenSSLCertificate|OpenSSLAsymmetricKey|array'],
],
'pack' => [
'old' => ['string|false', 'format'=>'string', '...values='=>'mixed'],
'new' => ['string', 'format'=>'string', '...values='=>'mixed'],
],
'parse_str' => [
'old' => ['void', 'string'=>'string', '&w_result='=>'array'],
'new' => ['void', 'string'=>'string', '&w_result'=>'array'],
Expand All @@ -1717,6 +1749,10 @@
'old' => ['bool', 'enable='=>'bool'],
'new' => ['bool', 'enable='=>'?bool'],
],
'pcntl_exec' => [
'old' => ['null|false', 'path'=>'string', 'args='=>'array', 'env_vars='=>'array'],
'new' => ['false', 'path'=>'string', 'args='=>'array', 'env_vars='=>'array'],
],
'pcntl_getpriority' => [
'old' => ['int', 'process_id='=>'int', 'mode='=>'int'],
'new' => ['int', 'process_id='=>'?int', 'mode='=>'int'],
Expand Down Expand Up @@ -2069,6 +2105,10 @@
'old' => ['string|false', 'stream'=>'resource', 'length='=>'int', 'offset='=>'int'],
'new' => ['string|false', 'stream'=>'resource', 'length='=>'?int', 'offset='=>'int'],
],
'stream_set_chunk_size' => [
'old' => ['int|false', 'stream'=>'resource', 'size'=>'int'],
'new' => ['int', 'stream'=>'resource', 'size'=>'int'],
],
'stream_socket_accept' => [
'old' => ['resource|false', 'socket'=>'resource', 'timeout='=>'float', '&w_peer_name='=>'string'],
'new' => ['resource|false', 'socket'=>'resource', 'timeout='=>'?float', '&w_peer_name='=>'string'],
Expand Down Expand Up @@ -2175,19 +2215,19 @@
],
'xml_get_current_byte_index' => [
'old' => ['int|false', 'parser'=>'resource'],
'new' => ['int|false', 'parser'=>'XMLParser'],
'new' => ['int', 'parser'=>'XMLParser'],
],
'xml_get_current_column_number' => [
'old' => ['int|false', 'parser'=>'resource'],
'new' => ['int|false', 'parser'=>'XMLParser'],
'new' => ['int', 'parser'=>'XMLParser'],
],
'xml_get_current_line_number' => [
'old' => ['int|false', 'parser'=>'resource'],
'new' => ['int|false', 'parser'=>'XMLParser'],
'new' => ['int', 'parser'=>'XMLParser'],
],
'xml_get_error_code' => [
'old' => ['int|false', 'parser'=>'resource'],
'new' => ['int|false', 'parser'=>'XMLParser'],
'new' => ['int', 'parser'=>'XMLParser'],
],
'xml_parse' => [
'old' => ['int', 'parser'=>'resource', 'data'=>'string', 'is_final='=>'bool'],
Expand All @@ -2210,8 +2250,8 @@
'new' => ['bool', 'parser'=>'XMLParser'],
],
'xml_parser_get_option' => [
'old' => ['mixed|false', 'parser'=>'resource', 'option'=>'int'],
'new' => ['mixed|false', 'parser'=>'XMLParser', 'option'=>'int'],
'old' => ['string|false', 'parser'=>'resource', 'option'=>'int'],
'new' => ['string', 'parser'=>'XMLParser', 'option'=>'int'],
],
'xml_parser_set_option' => [
'old' => ['bool', 'parser'=>'resource', 'option'=>'int', 'value'=>'mixed'],
Expand Down
40 changes: 26 additions & 14 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@
'old' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string'],
'new' => ['HashContext', 'algo'=>'string', 'flags='=>'int', 'key='=>'string', 'options='=>'array{seed:scalar}'],
],
'imageinterlace' => [
'old' => ['int|bool', 'image'=>'GdImage', 'enable='=>'bool|null'],
'new' => ['bool', 'image'=>'GdImage', 'enable='=>'bool|null'],
'imageloadfont' => [
'old' => ['int|false', 'filename'=>'string'],
'new' => ['GdFont|false', 'filename'=>'string'],
],
'imap_append' => [
'old' => ['bool', 'imap'=>'resource', 'folder'=>'string', 'message'=>'string', 'options='=>'?string', 'internal_date='=>'?string'],
Expand Down Expand Up @@ -379,20 +379,20 @@
'new' => ['bool', 'imap'=>'IMAP\Connection', 'message_nums'=>'string', 'mailbox'=>'string', 'flags='=>'int'],
],
'imap_mailboxmsginfo' => [
'old' => ['stdClass|false', 'imap'=>'resource'],
'new' => ['stdClass|false', 'imap'=>'IMAP\Connection'],
'old' => ['stdClass', 'imap'=>'resource'],
'new' => ['stdClass', 'imap'=>'IMAP\Connection'],
],
'imap_msgno' => [
'old' => ['int|false', 'imap'=>'resource', 'message_uid'=>'int'],
'new' => ['int|false', 'imap'=>'IMAP\Connection', 'message_uid'=>'int'],
'old' => ['int', 'imap'=>'resource', 'message_uid'=>'int'],
'new' => ['int', 'imap'=>'IMAP\Connection', 'message_uid'=>'int'],
],
'imap_num_msg' => [
'old' => ['int|false', 'imap'=>'resource'],
'new' => ['int|false', 'imap'=>'IMAP\Connection'],
],
'imap_num_recent' => [
'old' => ['int|false', 'imap'=>'resource'],
'new' => ['int|false', 'imap'=>'IMAP\Connection'],
'old' => ['int', 'imap'=>'resource'],
'new' => ['int', 'imap'=>'IMAP\Connection'],
],
'imap_open' => [
'old' => ['resource|false', 'mailbox'=>'string', 'user'=>'string', 'password'=>'string', 'flags='=>'int', 'retries='=>'int', 'options='=>'?array'],
Expand Down Expand Up @@ -515,8 +515,8 @@
'new' => ['LDAP\Connection|false', 'uri='=>'?string', 'port='=>'int', 'wallet='=>'string', 'password='=>'string', 'auth_mode='=>'int'],
],
'ldap_count_entries' => [
'old' => ['int|false', 'ldap'=>'resource', 'result'=>'resource'],
'new' => ['int|false', 'ldap'=>'LDAP\Connection', 'result'=>'LDAP\Result'],
'old' => ['int', 'ldap'=>'resource', 'result'=>'resource'],
'new' => ['int', 'ldap'=>'LDAP\Connection', 'result'=>'LDAP\Result'],
],
'ldap_delete' => [
'old' => ['bool', 'ldap'=>'resource', 'dn'=>'string'],
Expand Down Expand Up @@ -567,8 +567,8 @@
'new' => ['bool', 'result'=>'LDAP\Result'],
],
'ldap_get_attributes' => [
'old' => ['array|false', 'ldap'=>'resource', 'entry'=>'resource'],
'new' => ['array|false', 'ldap'=>'LDAP\Connection', 'entry'=>'LDAP\ResultEntry'],
'old' => ['array', 'ldap'=>'resource', 'entry'=>'resource'],
'new' => ['array', 'ldap'=>'LDAP\Connection', 'entry'=>'LDAP\ResultEntry'],
],
'ldap_get_dn' => [
'old' => ['string|false', 'ldap'=>'resource', 'entry'=>'resource'],
Expand Down Expand Up @@ -1110,6 +1110,10 @@
'old' => ['bool', 'dictionary'=>'int'],
'new' => ['bool', 'dictionary'=>'PSpell\Dictionary'],
],
'pspell_config_create' => [
'old' => ['int', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string'],
'new' => ['PSpell\Config', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string'],
],
'pspell_config_data_dir' => [
'old' => ['bool', 'config'=>'int', 'directory'=>'string'],
'new' => ['bool', 'config'=>'PSpell\Config', 'directory'=>'string'],
Expand Down Expand Up @@ -1142,9 +1146,17 @@
'old' => ['bool', 'config'=>'int', 'save'=>'bool'],
'new' => ['bool', 'config'=>'PSpell\Config', 'save'=>'bool'],
],
'pspell_new' => [
'old' => ['int|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
'new' => ['PSpell\Dictionary|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
],
'pspell_new_config' => [
'old' => ['int|false', 'config'=>'int'],
'new' => ['int|false', 'config'=>'PSpell\Config'],
'new' => ['PSpell\Dictionary|false', 'config'=>'PSpell\Config'],
],
'pspell_new_personal' => [
'old' => ['int|false', 'filename'=>'string', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
'new' => ['PSpell\Dictionary|false', 'filename'=>'string', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
],
'pspell_save_wordlist' => [
'old' => ['bool', 'dictionary'=>'int'],
Expand Down
Loading

0 comments on commit 466ff68

Please sign in to comment.