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])
| 119 | /// This avoids a redundant `fs::read` when the caller already has the |
| 120 | /// bytes in memory (e.g. from a parallel batch read). |
| 121 | pub 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). |
no test coverage detected