MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / display_class_name

Function display_class_name

src/completion/builder.rs:32–38  ·  view source on GitHub ↗

Return a user-friendly class name for display in completion item details. Anonymous classes have synthetic names like `__anonymous@156` which are meaningless to the user. This replaces them with `"anonymous class"`.

(name: &str)

Source from the content-addressed store, hash-verified

30/// Anonymous classes have synthetic names like `__anonymous@156` which are
31/// meaningless to the user. This replaces them with `"anonymous class"`.
32fn display_class_name(name: &str) -> &str {
33 if name.starts_with("__anonymous@") {
34 "anonymous class"
35 } else {
36 name
37 }
38}
39
40/// Build an LSP snippet string for a callable (function, method, or constructor).
41///

Callers 2

build_completion_itemsFunction · 0.70
class_names_from_dataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected