How to setup autocomplete for a function argument with a set of values?

I have this function getPostData.

/**
 * @param $inputName
 * @param 'integer'|'float'|'email'|'name'|'address'|'url'|'date'|'pan'|null $get_data_type
 * @return string|null
 */
function getPostData($inputName, string|null $get_data_type = null): string|null
{
$string = $_POST['something'];
// TODO some work
return $string;
}

 

When calling `getPostData("sample", get_data_type: “email”)`, I am not getting the autocomplete for `$get_data_type`.

How to setup this?

0

请先登录再写评论。