extensions/felixfbecker.php-intellisense-0.0.12/vendor/felixfbecker/language-server/src/Server/TextDocument.php
/**
     * The goto definition request is sent from the client to the server to resolve the definition location of a symbol
     * at a given text document position.
     *
     * @param TextDocumentIdentifier $textDocument The text document
     * @param Position $position The position inside the text document
     * @return Promise <Location|Location[]>
     */
The goto definition request is sent from the client to the server to resolve the definition location of a symbol
at a given text document position.

@param TextDocumentIdentifier $textDocument The text document
@param Position $position The position inside the text document
@return Promise 
The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position . @param TextDocumentIdentifier $textDocument The text document @param Position $position The position inside the text document @return Promise
public function definition(TextDocumentIdentifier $textDocument, Position $position): Promise
    {
        return coroutine(function () use ($textDocument, $position) {
            $document = yield $this->project->getOrLoadDocument($textDocument->uri);
            $node = $document->getNodeAtPosition($position);
            if ($node === null) {
                return [];
            }
            $def = yield $document->getDefinitionByNode($node);
            if ($def === null) {
                return [];
            }
            return Location::fromNode($def);
        });
    }
public function definition ( TextDocumentIdentifier $ textDocument , Position $ position ) : Promise { return coroutine ( function ( ) use ( $ textDocument , $ position ) { $ document = yield $ this -> project -> getOrLoadDocument ( $ textDocument -> uri ) ; $ node = $ document -> getNodeAtPosition ( $ position ) ; if ( $ node === null ) { return [ ] ; } $ def = yield $ document -> getDefinitionByNode ( $ node ) ; if ( $ def === null ) { return [ ] ; } return Location :: fromNode ( $ def ) ; } ) ; }
The goto definition request is sent from the client to the server to resolve the definition location of a symbol
 at a given text document position.
The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position .