Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions resources/functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12644,12 +12644,16 @@
'unserialize' => ['mixed', 'variable_representation'=>'string', 'allowed_classes='=>'array{allowed_classes?:string[]|bool}'],
'unset' => ['void', 'var='=>'mixed', '...args='=>'mixed'],
'untaint' => ['bool', '&rw_string'=>'string', '&...rw_strings='=>'string'],
'uopz_add_function' => ['bool', 'class'=>'string', 'function'=>'string', 'handler'=>'Closure', '$flags'=>'bool', '$all'=>'bool'],
'uopz_add_function\1' => ['bool', 'function'=>'string', 'handler'=>'Closure', '$flags'=>'bool'],
'uopz_allow_exit' => ['void', 'allow'=>'bool'],
'uopz_backup' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_backup\'1' => ['void', 'function'=>'string'],
'uopz_compose' => ['void', 'name'=>'string', 'classes'=>'array', 'methods='=>'array', 'properties='=>'array', 'flags='=>'int'],
'uopz_copy' => ['Closure', 'class'=>'string', 'function'=>'string'],
'uopz_copy\'1' => ['Closure', 'function'=>'string'],
'uopz_del_function' => ['bool', 'class'=>'string', 'function'=>'string', '$all'=>'bool'],
'uopz_del_function\1' => ['bool', 'function'=>'string'],
'uopz_delete' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_delete\'1' => ['void', 'function'=>'string'],
'uopz_extend' => ['void', 'class'=>'string', 'parent'=>'string'],
Expand All @@ -12658,8 +12662,14 @@
'uopz_function' => ['void', 'class'=>'string', 'function'=>'string', 'handler'=>'Closure', 'modifiers='=>'int'],
'uopz_function\'1' => ['void', 'function'=>'string', 'handler'=>'Closure', 'modifiers='=>'int'],
'uopz_get_exit_status' => ['mixed'],
'uopz_get_hook' => ['Closure', 'class'=>'string', 'function'=>'string'],
'uopz_get_hook\1' => ['Closure', 'function'=>'string'],
'uopz_get_mock' => ['mixed', 'class'=>'string'],
'uopz_get_property' => ['void', 'class'=>'string', 'property'=>'string'],
'uopz_get_property\1' => ['void', 'instance'=>'object', 'property'=>'string'],
'uopz_get_return' => ['mixed', 'class='=>'string', 'function='=>'string'],
'uopz_get_static' => ['array', 'class='=>'string', 'function='=>'string'],
'uopz_get_static\1' => ['array', 'function='=>'string'],
'uopz_implement' => ['void', 'class'=>'string', 'interface'=>'string'],
'uopz_overload' => ['void', 'opcode'=>'int', 'callable'=>'Callable'],
'uopz_redefine' => ['void', 'class'=>'string', 'constant'=>'string', 'value'=>'mixed'],
Expand All @@ -12668,11 +12678,19 @@
'uopz_rename\'1' => ['void', 'function'=>'string', 'rename'=>'string'],
'uopz_restore' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_restore\'1' => ['void', 'function'=>'string'],
'uopz_set_hook' => ['bool', 'class'=>'string', 'class'=>'function', 'hook'=>'Closure'],
'uopz_set_hook\1' => ['bool', 'class'=>'string', 'hook'=>'Closure'],
'uopz_set_mock' => ['void', 'class'=>'string', 'mock'=>'object|string'],
'uopz_set_property' => ['void', 'class'=>'string', 'property'=>'string', 'value'=>'mixed'],
'uopz_set_property\1' => ['void', 'instance'=>'object', 'property'=>'string', 'value'=>'mixed'],
'uopz_set_return' => ['bool', 'class'=>'string', 'function'=>'string', 'value'=>'mixed', 'execute='=>'bool'],
'uopz_set_return\'1' => ['bool', 'function'=>'string', 'value'=>'mixed', 'execute='=>'bool'],
'uopz_set_return' => ['bool', 'class'=>'string', 'function'=>'string', 'static'=>'array'],
'uopz_set_return\'1' => ['bool', 'function'=>'string', 'static='=>'array'],
Comment on lines +12688 to +12689

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misunderstanding this, but currently PHPStan is complaining that Parameter #3 $static of function uopz_set_return expects array while parameter #3 is actually the value in the following form:
https://github.com/krakjoe/uopz/blob/v6.1.2/uopz.c#L185-L186

 uopz_set_return ( string $class , string $function , mixed $value , bool $execute = false ) : bool

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SMillerDev Hi, this is a pretty old PR. If you see a buggy behaviour, please open an issue with reproduction, thank you.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, thanks.

'uopz_undefine' => ['void', 'class'=>'string', 'constant'=>'string'],
'uopz_undefine\'1' => ['void', 'constant'=>'string'],
'uopz_set_hook' => ['bool', 'class'=>'string', 'class'=>'function'],
'uopz_set_hook\1' => ['bool', 'class'=>'string'],
'uopz_unset_mock' => ['void', 'class'=>'string'],
'uopz_unset_return' => ['bool', 'class='=>'string', 'function='=>'string'],
'uopz_unset_return\'1' => ['bool', 'function'=>'string'],
Expand Down