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

Function short_name

src/util.rs:418–420  ·  view source on GitHub ↗

Extract the short (unqualified) class name from a potentially fully-qualified name. For example, `"Illuminate\\Support\\Collection"` → `"Collection"`, and `"Collection"` → `"Collection"`.

(name: &str)

Source from the content-addressed store, hash-verified

416/// For example, `"Illuminate\\Support\\Collection"` → `"Collection"`,
417/// and `"Collection"` → `"Collection"`.
418pub(crate) fn short_name(name: &str) -> &str {
419 name.rsplit('\\').next().unwrap_or(name)
420}
421
422/// Strip the leading fully-qualified-name backslash from a PHP name.
423///

Callers 12

build_class_detailFunction · 0.70
short_name_ofMethod · 0.70
find_class_by_nameFunction · 0.70
load_stub_classMethod · 0.70
resolve_class_nameMethod · 0.70
class_loader_withMethod · 0.70
build_substitution_mapFunction · 0.70
subtypes_implMethod · 0.70

Calls 1

nextMethod · 0.80

Tested by

no test coverage detected