Skip to content

Commit

Permalink
Update return types in some reflection methods
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Oct 24, 2023
1 parent 80ce9a4 commit 2b51b2b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/functionMap_php74delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'preg_replace_callback' => ['string|array|null', 'regex'=>'string|array', 'callback'=>'callable(array<int|string, string>):string', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
'preg_replace_callback_array' => ['string|array|null', 'pattern'=>'array<string,callable>', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
'sapi_windows_set_ctrl_handler' => ['bool', 'callable'=>'callable(int):void', 'add='=>'bool'],
'ReflectionProperty::getType' => ['?ReflectionType'],
'ReflectionProperty::getType' => ['?ReflectionNamedType'],
'ReflectionProperty::hasType' => ['bool'],
'ReflectionProperty::isInitialized' => ['bool', 'object='=>'?object'],
'ReflectionReference::fromArrayElement' => ['?ReflectionReference', 'array'=>'array', 'key'=>'int|string'],
Expand Down
8 changes: 8 additions & 0 deletions resources/functionMap_php80delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
'PhpToken::getTokenName' => ['string'],
'preg_match_all' => ['0|positive-int|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'array', 'flags='=>'int', 'offset='=>'int'],
'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}', 'process'=>'resource'],
'ReflectionFunction::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionMethod::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionParameter::getType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionProperty::getType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'set_error_handler' => ['?callable', 'callback'=>'null|callable(int,string,string,int):bool', 'error_types='=>'int'],
'socket_addrinfo_lookup' => ['AddressInfo[]', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'],
'socket_select' => ['int|false', '&rw_read'=>'Socket[]|null', '&rw_write'=>'Socket[]|null', '&rw_except'=>'Socket[]|null', 'seconds'=>'int|null', 'microseconds='=>'int'],
Expand Down Expand Up @@ -230,6 +234,10 @@
'png2wbmp' => ['bool', 'pngname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}|false', 'process'=>'resource'],
'read_exif_data' => ['array', 'filename'=>'string', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],
'ReflectionFunction::getReturnType' => ['?ReflectionNamedType'],
'ReflectionMethod::getReturnType' => ['?ReflectionNamedType'],
'ReflectionParameter::getType' => ['?ReflectionNamedType'],
'ReflectionProperty::getType' => ['?ReflectionNamedType'],
'restore_include_path' => ['void'],
'socket_select' => ['int|false', '&rw_read_fds'=>'resource[]|null', '&rw_write_fds'=>'resource[]|null', '&rw_except_fds'=>'resource[]|null', 'tv_sec'=>'int|null', 'tv_usec='=>'int|null'],
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['?string|?false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
Expand Down
9 changes: 8 additions & 1 deletion resources/functionMap_php81delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
*/
return [
'new' => [

'ReflectionFunction::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'],
'ReflectionMethod::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'],
'ReflectionParameter::getType' => ['ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'],
'ReflectionProperty::getType' => ['ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'],
],
'old' => [
'pg_escape_bytea' => ['string', 'connection'=>'resource', 'data'=>'string'],
Expand Down Expand Up @@ -64,5 +67,9 @@
'pg_tty\'1' => ['string'],
'pg_untrace' => ['bool', 'connection='=>'resource'],
'pg_untrace\'1' => ['bool'],
'ReflectionFunction::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionMethod::getReturnType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionParameter::getType' => ['ReflectionNamedType|ReflectionUnionType|null'],
'ReflectionProperty::getType' => ['ReflectionNamedType|ReflectionUnionType|null'],
]
];

0 comments on commit 2b51b2b

Please sign in to comment.