extensions/felixfbecker.php-intellisense-0.0.12/vendor/felixfbecker/language-server/src/Server/TextDocument.php
/**
     * The references request is sent from the client to the server to resolve project-wide references for the symbol
     * denoted by the given text document position.
     *
     * @param ReferenceContext $context
     * @return Promise <Location[]>
     */
The references request is sent from the client to the server to resolve project-wide references for the symbol
denoted by the given text document position.

@param ReferenceContext $context
@return Promise 
The references request is sent from the client to the server to resolve project - wide references for the symbol denoted by the given text document position . @param ReferenceContext $context @return Promise
public function references(
        ReferenceContext $context,
        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 [];
            }
            $refs = yield $document->getReferencesByNode($node);
            $locations = [];
            foreach ($refs as $ref) {
                $locations[] = Location::fromNode($ref);
            }
            return $locations;
        });
    }
public function references ( ReferenceContext $ context , 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 [ ] ; } $ refs = yield $ document -> getReferencesByNode ( $ node ) ; $ locations = [ ] ; foreach ( $ refs as $ ref ) { $ locations [ ] = Location :: fromNode ( $ ref ) ; } return $ locations ; } ) ; }
The references request is sent from the client to the server to resolve project-wide references for the symbol
 denoted by the given text document position.
The references request is sent from the client to the server to resolve project - wide references for the symbol denoted by the given text document position .