1
0
Fork 0

updated docs and comments

pull/438/head
Ivan Bozhanov 2017-07-15 18:25:16 +03:00
parent f84b6a48b6
commit 7b54ecd67c
3 changed files with 9 additions and 2 deletions

View File

@ -98,6 +98,7 @@ class Definition
* @var string * @var string
*/ */
public $documentation; public $documentation;
/** /**
* Parameters array (for methods and functions), for use in textDocument/signatureHelp * Parameters array (for methods and functions), for use in textDocument/signatureHelp
* *

View File

@ -238,10 +238,8 @@ class DefinitionResolver
$def->parameters = []; $def->parameters = [];
if (property_exists($node, 'parameters') && $node->parameters) { if (property_exists($node, 'parameters') && $node->parameters) {
foreach ($node->parameters->getElements() as $param) { foreach ($node->parameters->getElements() as $param) {
//var_dump($param); die();
$def->parameters[] = new ParameterInformation( $def->parameters[] = new ParameterInformation(
$this->getDeclarationLineFromNode($param), $this->getDeclarationLineFromNode($param),
//$param->getName(), // TODO: rebuild this
$this->getDocumentationFromNode($param) $this->getDocumentationFromNode($param)
); );
} }

View File

@ -417,6 +417,14 @@ class TextDocument
}); });
} }
/**
* The signature help request is sent from the client to the server to request signature information
* at a given cursor position.
*
* @param TextDocumentIdentifier $textDocument The text document
* @param Position $position The position inside the text document
* @return Promise <SignatureHelp>
*/
public function signatureHelp(TextDocumentIdentifier $textDocument, Position $position): Promise public function signatureHelp(TextDocumentIdentifier $textDocument, Position $position): Promise
{ {
return coroutine(function () use ($textDocument, $position) { return coroutine(function () use ($textDocument, $position) {