diff --git a/resources/functionMap.php b/resources/functionMap.php index 82789aea05..289f7ef697 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -2776,7 +2776,7 @@ 'get_magic_quotes_gpc' => ['false'], 'get_magic_quotes_runtime' => ['false'], 'get_meta_tags' => ['array|false', 'filename'=>'string', 'use_include_path='=>'bool'], -'get_object_vars' => ['array', 'obj'=>'object'], +'get_object_vars' => ['array', 'obj'=>'object'], 'get_parent_class' => ['class-string|false', 'object='=>'mixed'], 'get_required_files' => ['list'], 'get_resource_type' => ['string', 'res'=>'resource'], diff --git a/tests/PHPStan/Analyser/nsrt/get-object-vars.php b/tests/PHPStan/Analyser/nsrt/get-object-vars.php new file mode 100644 index 0000000000..5817a63825 --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/get-object-vars.php @@ -0,0 +1,14 @@ +', get_object_vars($object)); + assertType('array', get_object_vars(json_decode('{"1": "test"}'))); +}