We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Short version: for function(string ...$vars) with PHPDoc, $vars is interpreted as string[][].
function(string ...$vars)
$vars
string[][]
Consider the function:
function FunctionWithoutPHPDoc(string ...$stringArray) { var_dump($stringArray); }
$stringArray is declared as an array of strings. The hover text correctly identifies it as such:
$stringArray
@param string[] ...$stringArray
However, adding a PHPDoc changes how Intelephense recognizes the variable type.
Press Ctrl+. and select "Add PHPDoc" to produce this code block:
Ctrl
.
/** * @param string[] $stringArray * * @return void */ function FunctionWithPHPDoc(string ...$stringArray) { var_dump($stringArray); }
(the function has been renamed in this example, obviously, but that is irrelevant to the issue)
The hover text now displays:
@param string[][] $stringArray
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Short version: for
function(string ...$vars)
with PHPDoc,$vars
is interpreted asstring[][]
.Consider the function:
$stringArray
is declared as an array of strings. The hover text correctly identifies it as such:However, adding a PHPDoc changes how Intelephense recognizes the variable type.
Press
Ctrl
+.
and select "Add PHPDoc" to produce this code block:(the function has been renamed in this example, obviously, but that is irrelevant to the issue)
The hover text now displays:
The text was updated successfully, but these errors were encountered: