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

Function scan_content

src/classmap_scanner.rs:121–126  ·  view source on GitHub ↗

Scan already-loaded file content and return the fully-qualified class names it defines. This avoids a redundant `fs::read` when the caller already has the bytes in memory (e.g. from a parallel batch read).

(content: &[u8])

Source from the content-addressed store, hash-verified

119/// This avoids a redundant `fs::read` when the caller already has the
120/// bytes in memory (e.g. from a parallel batch read).
121pub fn scan_content(content: &[u8]) -> Vec<String> {
122 if content.is_empty() {
123 return Vec::new();
124 }
125 find_classes(content)
126}
127
128/// Scan a single PHP file and return all discovered symbols (classes,
129/// functions, and constants).

Callers 2

scan_files_parallel_psr4Function · 0.85

Calls 2

find_classesFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected