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

Function fqcn_short_name

src/classmap_scanner.rs:1734–1736  ·  view source on GitHub ↗

Extract the short (unqualified) class name from a fully-qualified name. For example, `"DMS\\PHPUnitExtensions\\ArraySubset\\ArraySubsetAsserts"` yields `"ArraySubsetAsserts"`.

(fqcn: &str)

Source from the content-addressed store, hash-verified

1732/// For example, `"DMS\\PHPUnitExtensions\\ArraySubset\\ArraySubsetAsserts"`
1733/// yields `"ArraySubsetAsserts"`.
1734fn fqcn_short_name(fqcn: &str) -> &str {
1735 fqcn.rsplit('\\').next().unwrap_or(fqcn)
1736}
1737
1738/// Extract string values from a JSON value that is either a single
1739/// string or an array of strings.

Callers 1

scan_files_parallel_fullFunction · 0.85

Calls 1

nextMethod · 0.80

Tested by

no test coverage detected