1
0
Fork 0
jens1o 2017-11-15 18:37:16 +01:00
parent 5c9b155004
commit f970833b0a
No known key found for this signature in database
GPG Key ID: C7437FC1B445CC49
2 changed files with 9 additions and 0 deletions

View File

@ -979,6 +979,11 @@ class DefinitionResolver
return $this->resolveExpressionNodeToType($node->argumentExpressionList->children[2]->expression);
}
// FOREACH KEY VARIABLE
if ($node instanceof Node\ForeachKey) {
return new Types\Integer;
}
// PARAMETERS
// Get the type of the parameter:
// 1. Doc block

View File

@ -83,6 +83,8 @@ class SymbolInformation
)
|| $node instanceof Node\UseVariableName
|| $node instanceof Node\Parameter
|| $node instanceof Node\ForeachValue
|| $node instanceof Node\ForeachKey
) {
$symbol->kind = SymbolKind::VARIABLE;
} else {
@ -103,6 +105,8 @@ class SymbolInformation
} else {
$symbol->name = ltrim((string)$node->name->getText($node->getFileContents()), "$");
}
} else if ($node instanceof Node\ForeachValue || $node instanceof Node\ForeachKey) {
$symbol->name = $node->expression->getName();
} else if (isset($node->variableName)) {
$symbol->name = $node->variableName->getText($node);
} else if (!isset($symbol->name)) {