src/Server/TextDocument.php
public function documentSymbol(TextDocumentIdentifier $textDocument): Promise
    {
        return $this->documentLoader->getOrLoad($textDocument->uri)->then(function (PhpDocument $document) {
            $symbols = [];
            foreach ($document->getDefinitions() as $fqn => $definition) {
                $symbols[] = $definition->symbolInformation;
            }
            return $symbols;
        });
    }
public function documentSymbol(TextDocumentIdentifier $textDocument): Promise
    {
        return $this->documentLoader->getOrLoad($textDocument->uri)->then(function (PhpDocument $document) {
            $symbols = [];
            foreach ($document->getDefinitions() as $fqn => $definition) {
                $symbols[] = $definition->symbolInformation;
            }
            return $symbols;
        });
    }
public function documentSymbol ( TextDocumentIdentifier $ textDocument ) : Promise { return $ this -> documentLoader -> getOrLoad ( $ textDocument -> uri ) -> then ( function ( PhpDocument $ document ) { $ symbols = [ ] ; foreach ( $ document -> getDefinitions ( ) as $ fqn => $ definition ) { $ symbols [ ] = $ definition -> symbolInformation ; } return $ symbols ; } ) ; }
The document symbol request is sent from the client to the server to list all symbols found in a given text
document.

@param \LanguageServerProtocol\TextDocumentIdentifier $textDocument
@return Promise <SymbolInformation[]>
The document symbol request is sent from the client to the server to list all symbols found in a given text document .