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

Function build_fqn

src/util.rs:443–448  ·  view source on GitHub ↗

Build a fully-qualified name from a short name and an optional namespace. `("Foo", Some("App\\Models"))` → `"App\\Models\\Foo"`, `("Foo", None)` → `"Foo"`.

(short_name: &str, namespace: Option<&str>)

Source from the content-addressed store, hash-verified

441/// `("Foo", Some("App\\Models"))` → `"App\\Models\\Foo"`,
442/// `("Foo", None)` → `"Foo"`.
443pub(crate) fn build_fqn(short_name: &str, namespace: Option<&str>) -> String {
444 match namespace {
445 Some(ns) if !ns.is_empty() => format!("{}\\{}", ns, short_name),
446 _ => short_name.to_string(),
447 }
448}
449
450/// Check whether a type string has unclosed delimiters (`<>`, `()`, `{}`).
451///

Callers 12

subtypes_implMethod · 0.85
highlight_classMethod · 0.85
find_implementorsMethod · 0.85
find_declaring_classMethod · 0.85
find_class_referencesMethod · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected