src/CompletionProvider.php
private function getCompletionsForKeywords(string $prefix): \Generator
    {
        foreach (self::KEYWORDS as $keyword) {
            if (nameStartsWith($keyword, $prefix)) {
                $item = new CompletionItem($keyword, CompletionItemKind::KEYWORD);
                $item->insertText = $keyword;
                yield $keyword => $item;
            }
        }
    }
private function getCompletionsForKeywords(string $prefix): \Generator
    {
        foreach (self::KEYWORDS as $keyword) {
            if (nameStartsWith($keyword, $prefix)) {
                $item = new CompletionItem($keyword, CompletionItemKind::KEYWORD);
                $item->insertText = $keyword;
                yield $keyword => $item;
            }
        }
    }
private function getCompletionsForKeywords ( string $ prefix ) : \ Generator { foreach ( self :: KEYWORDS as $ keyword ) { if ( nameStartsWith ( $ keyword , $ prefix ) ) { $ item = new CompletionItem ( $ keyword , CompletionItemKind :: KEYWORD ) ; $ item -> insertText = $ keyword ; yield $ keyword => $ item ; } } }
Completes PHP keywords.

@return \Generator|CompletionItem[]
Yields CompletionItems.
Completes PHP keywords .