extensions/felixfbecker.php-intellisense-0.0.12/vendor/felixfbecker/language-server/src/LanguageServer.php
/**
     * Returns all PHP files in the workspace.
     * If the client does not support workspace/files, it falls back to searching the file system directly.
     *
     * @return Promise <TextDocumentIdentifier[]>
     */
Returns all PHP files in the workspace.
If the client does not support workspace/files, it falls back to searching the file system directly.

@return Promise 
Returns all PHP files in the workspace . If the client does not support workspace / files it falls back to searching the file system directly . @return Promise
private function findPhpFiles(): Promise
    {
        return coroutine(function () {
            $textDocuments = [];
            $pattern = Path::makeAbsolute('**/*.php', $this->rootPath);
            if ($this->clientCapabilities->xfilesProvider) {
                foreach (yield $this->client->workspace->xfiles() as $textDocument) {
                    $path = Uri\parse($textDocument->uri)['path'];
                    if (Glob::match($path, $pattern)) {
                        $textDocuments[] = $textDocument;
                    }
                }
            } else {
                foreach (new GlobIterator($pattern) as $path) {
                    $textDocuments[] = new TextDocumentIdentifier(pathToUri($path));
                    yield timeout();
                }
            }
            return $textDocuments;
        });
    }
private function findPhpFiles ( ) : Promise { return coroutine ( function ( ) { $ textDocuments = [ ] ; $ pattern = Path :: makeAbsolute ( '**/*.php' , $ this -> rootPath ) ; if ( $ this -> clientCapabilities -> xfilesProvider ) { foreach ( yield $ this -> client -> workspace -> xfiles ( ) as $ textDocument ) { $ path = Uri \ parse ( $ textDocument -> uri ) [ 'path' ] ; if ( Glob :: match ( $ path , $ pattern ) ) { $ textDocuments [ ] = $ textDocument ; } } } else { foreach ( new GlobIterator ( $ pattern ) as $ path ) { $ textDocuments [ ] = new TextDocumentIdentifier ( pathToUri ( $ path ) ) ; yield timeout ( ) ; } } return $ textDocuments ; } ) ; }
Returns all PHP files in the workspace.
Returns all PHP files in the workspace .
// Use xfiles request // Use the file system