Skip to content

Commit

Permalink
Merge pull request #9113 from othercorey/callmap-returns
Browse files Browse the repository at this point in the history
Clean up more callmap return types
  • Loading branch information
orklah committed Jan 15, 2023
2 parents 3e66c6b + 66ee278 commit f4b7ab9
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 260 deletions.
164 changes: 81 additions & 83 deletions dictionaries/CallMap.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dictionaries/CallMap_72_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
'sodium_crypto_aead_aes256gcm_is_available' => ['bool'],
'sodium_crypto_aead_aes256gcm_keygen' => ['non-empty-string'],
'sodium_crypto_aead_chacha20poly1305_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['non-empty-string'],
'sodium_crypto_aead_chacha20poly1305_keygen' => ['non-empty-string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['non-empty-string'],
'sodium_crypto_auth' => ['string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_auth_keygen' => ['non-empty-string'],
Expand Down
108 changes: 82 additions & 26 deletions dictionaries/CallMap_80_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@
'old' => ['bool', 'name'=>'string', 'content'=>'string', 'isParam'=>'bool', 'publicId'=>'string', 'systemId'=>'string', 'notationData'=>'string'],
'new' => ['bool', 'name'=>'string', 'content'=>'string', 'isParam='=>'bool', 'publicId='=>'?string', 'systemId='=>'?string', 'notationData='=>'?string'],
],
'ZipArchive::getStatusString' => [
'old' => ['string|false'],
'new' => ['string'],
],
'ZipArchive::setEncryptionIndex' => [
'old' => ['bool', 'index'=>'int', 'method'=>'string', 'password='=>'string'],
'new' => ['bool', 'index'=>'int', 'method'=>'string', 'password='=>'?string'],
Expand Down Expand Up @@ -502,8 +506,8 @@
'new' => ['array|false', 'multi_handle'=>'CurlMultiHandle', '&w_queued_messages='=>'int'],
],
'curl_multi_init' => [
'old' => ['resource|false'],
'new' => ['CurlMultiHandle|false'],
'old' => ['resource'],
'new' => ['CurlMultiHandle'],
],
'curl_multi_remove_handle' => [
'old' => ['int', 'mh'=>'resource', 'ch'=>'resource'],
Expand Down Expand Up @@ -613,6 +617,14 @@
'old' => ['?IntlDateFormatter', 'locale'=>'?string', 'dateType'=>'int', 'timeType'=>'int', 'timezone='=>'DateTimeZone|IntlTimeZone|string|null', 'calendar='=>'IntlCalendar|int|null', 'pattern='=>'string'],
'new' => ['?IntlDateFormatter', 'locale'=>'?string', 'dateType='=>'int', 'timeType='=>'int', 'timezone='=>'DateTimeZone|IntlTimeZone|string|null', 'calendar='=>'IntlCalendar|int|null', 'pattern='=>'?string'],
],
'deflate_add' => [
'old' => ['string|false', 'context'=>'resource', 'data'=>'string', 'flush_mode='=>'int'],
'new' => ['string|false', 'context'=>'DeflateContext', 'data'=>'string', 'flush_mode='=>'int'],
],
'deflate_init' => [
'old' => ['resource|false', 'encoding'=>'int', 'options='=>'array'],
'new' => ['DeflateContext|false', 'encoding'=>'int', 'options='=>'array'],
],
'dom_import_simplexml' => [
'old' => ['DOMElement|null', 'node'=>'SimpleXMLElement'],
'new' => ['DOMElement', 'node'=>'SimpleXMLElement'],
Expand All @@ -625,6 +637,10 @@
'old' => ['int', 'year='=>'int', 'mode='=>'int'],
'new' => ['int', 'year='=>'?int', 'mode='=>'int'],
],
'enchant_broker_init' => [
'old' => ['resource|false'],
'new' => ['EnchantBroker|false'],
],
'error_log' => [
'old' => ['bool', 'message'=>'string', 'message_type='=>'int', 'destination='=>'string', 'additional_headers='=>'string'],
'new' => ['bool', 'message'=>'string', 'message_type='=>'int', 'destination='=>'?string', 'additional_headers='=>'?string'],
Expand All @@ -642,8 +658,8 @@
'new' => ['list<string>', 'separator'=>'string', 'string'=>'string', 'limit='=>'int'],
],
'fgetcsv' => [
'old' => ['list<string>|array{0: null}|false|null', 'stream'=>'resource', 'length='=>'int', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'new' => ['list<string>|array{0: null}|false|null', 'stream'=>'resource', 'length='=>'?int', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'old' => ['list<string>|array{0: null}|false', 'stream'=>'resource', 'length='=>'int', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'new' => ['list<string>|array{0: null}|false', 'stream'=>'resource', 'length='=>'?int', 'separator='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
],
'fgets' => [
'old' => ['string|false', 'stream'=>'resource', 'length='=>'int'],
Expand Down Expand Up @@ -701,6 +717,14 @@
'old' => ['GMP|false', 'n'=>'GMP|string|int', 'k'=>'int'],
'new' => ['GMP', 'n'=>'GMP|string|int', 'k'=>'int'],
],
'gmp_export' => [
'old' => ['string|false', 'num'=>'GMP|string|int', 'word_size='=>'int', 'flags='=>'int'],
'new' => ['string', 'num'=>'GMP|string|int', 'word_size='=>'int', 'flags='=>'int'],
],
'gmp_import' => [
'old' => ['GMP|false', 'data'=>'string', 'word_size='=>'int', 'flags='=>'int'],
'new' => ['GMP', 'data'=>'string', 'word_size='=>'int', 'flags='=>'int'],
],
'gmstrftime' => [
'old' => ['string|false', 'format'=>'string', 'timestamp='=>'int'],
'new' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'],
Expand Down Expand Up @@ -822,56 +846,56 @@
'new' => ['int|false', 'image'=>'GdImage', 'x'=>'int', 'y'=>'int'],
],
'imagecolorclosest' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
],
'imagecolorclosestalpha' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
],
'imagecolorclosesthwb' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
],
'imagecolordeallocate' => [
'old' => ['bool', 'image'=>'resource', 'color'=>'int'],
'new' => ['bool', 'image'=>'GdImage', 'color'=>'int'],
],
'imagecolorexact' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
],
'imagecolorexactalpha' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
],
'imagecolormatch' => [
'old' => ['bool', 'image1'=>'resource', 'image2'=>'resource'],
'new' => ['bool', 'image1'=>'GdImage', 'image2'=>'GdImage'],
],
'imagecolorresolve' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
],
'imagecolorresolvealpha' => [
'old' => ['int|false', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'old' => ['int', 'image'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'new' => ['int', 'image'=>'GdImage', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
],
'imagecolorset' => [
'old' => ['false|null', 'image'=>'resource', 'color'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha='=>'int'],
'new' => ['false|null', 'image'=>'GdImage', 'color'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha='=>'int'],
],
'imagecolorsforindex' => [
'old' => ['array|false', 'image'=>'resource', 'color'=>'int'],
'new' => ['array|false', 'image'=>'GdImage', 'color'=>'int'],
'old' => ['array', 'image'=>'resource', 'color'=>'int'],
'new' => ['array', 'image'=>'GdImage', 'color'=>'int'],
],
'imagecolorstotal' => [
'old' => ['int|false', 'image'=>'resource'],
'new' => ['int|false', 'image'=>'GdImage'],
'old' => ['int', 'image'=>'resource'],
'new' => ['int', 'image'=>'GdImage'],
],
'imagecolortransparent' => [
'old' => ['int|false', 'image'=>'resource', 'color='=>'int'],
'new' => ['int|false', 'image'=>'GdImage', 'color='=>'?int'],
'old' => ['int', 'image'=>'resource', 'color='=>'int'],
'new' => ['int', 'image'=>'GdImage', 'color='=>'?int'],
],
'imageconvolution' => [
'old' => ['bool', 'image'=>'resource', 'matrix'=>'array', 'divisor'=>'float', 'offset'=>'float'],
Expand Down Expand Up @@ -1813,6 +1837,34 @@
'old' => ['resource|false', 'key'=>'int', 'size='=>'int', 'permissions='=>'int'],
'new' => ['SysvSharedMemory|false', 'key'=>'int', 'size='=>'?int', 'permissions='=>'int'],
],
'shmop_close' => [
'old' => ['void', 'shmop'=>'resource'],
'new' => ['void', 'shmop'=>'Shmop'],
],
'shmop_delete' => [
'old' => ['bool', 'shmop'=>'resource'],
'new' => ['bool', 'shmop'=>'Shmop'],
],
'shmop_open' => [
'old' => ['resource|false', 'key'=>'int', 'mode'=>'string', 'permissions'=>'int', 'size'=>'int'],
'new' => ['Shmop|false', 'key'=>'int', 'mode'=>'string', 'permissions'=>'int', 'size'=>'int'],
],
'shmop_read' => [
'old' => ['string|false', 'shmop'=>'resource', 'offset'=>'int', 'size'=>'int'],
'new' => ['string', 'shmop'=>'Shmop', 'offset'=>'int', 'size'=>'int'],
],
'shmop_size' => [
'old' => ['int', 'shmop'=>'resource'],
'new' => ['int', 'shmop'=>'Shmop'],
],
'shmop_write' => [
'old' => ['int|false', 'shmop'=>'resource', 'data'=>'string', 'offset'=>'int'],
'new' => ['int', 'shmop'=>'Shmop', 'data'=>'string', 'offset'=>'int'],
],
'sleep' => [
'old' => ['int|false', 'seconds'=>'0|positive-int'],
'new' => ['int', 'seconds'=>'0|positive-int'],
],
'socket_accept' => [
'old' => ['resource|false', 'socket'=>'resource'],
'new' => ['Socket|false', 'socket'=>'Socket'],
Expand Down Expand Up @@ -1886,8 +1938,8 @@
'new' => ['bool', 'socket'=>'Socket', '&w_addr'=>'string', '&w_port='=>'int'],
],
'socket_import_stream' => [
'old' => ['resource|false|null', 'stream'=>'resource'],
'new' => ['Socket|false|null', 'stream'=>'resource'],
'old' => ['resource|false', 'stream'=>'resource'],
'new' => ['Socket|false', 'stream'=>'resource'],
],
'socket_last_error' => [
'old' => ['int', 'socket='=>'resource'],
Expand Down Expand Up @@ -1981,6 +2033,10 @@
'old' => ['string', 'file_extensions='=>'string'],
'new' => ['string', 'file_extensions='=>'?string'],
],
'spl_autoload_functions' => [
'old' => ['false|list<callable(string):void>'],
'new' => ['list<callable(string):void>'],
],
'spl_autoload_register' => [
'old' => ['bool', 'callback='=>'callable(string):void', 'throw='=>'bool', 'prepend='=>'bool'],
'new' => ['bool', 'callback='=>'callable(string):void|null', 'throw='=>'bool', 'prepend='=>'bool'],
Expand Down
12 changes: 10 additions & 2 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
],

'changed' => [
'DOMDocument::createComment' => [
'old' => ['DOMComment|false', 'data'=>'string'],
'new' => ['DOMComment', 'data'=>'string'],
],
'DOMDocument::createDocumentFragment' => [
'old' => ['DOMDocumentFragment|false'],
'new' => ['DOMDocumentFragment'],
],
'finfo_buffer' => [
'old' => ['string|false', 'finfo'=>'resource', 'string'=>'string', 'flags='=>'int', 'context='=>'resource'],
'new' => ['string|false', 'finfo'=>'finfo', 'string'=>'string', 'flags='=>'int', 'context='=>'resource'],
Expand Down Expand Up @@ -223,8 +231,8 @@
'new' => ['bool', 'ftp' => 'FTP\Connection', 'option' => 'int', 'value' => 'mixed'],
],
'ftp_get_option' => [
'old' => ['mixed|false', 'ftp' => 'resource', 'option' => 'int'],
'new' => ['mixed|false', 'ftp' => 'FTP\Connection', 'option' => 'int'],
'old' => ['int|false', 'ftp' => 'resource', 'option' => 'int'],
'new' => ['int|false', 'ftp' => 'FTP\Connection', 'option' => 'int'],
],
'hash' => [
'old' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'binary='=>'bool'],
Expand Down

0 comments on commit f4b7ab9

Please sign in to comment.