Scan a single PHP file and return all discovered symbols (classes, functions, and constants). Returns an empty [`ScanResult`] when the file cannot be read or is empty.
(path: &Path)
| 131 | /// Returns an empty [`ScanResult`] when the file cannot be read or is |
| 132 | /// empty. |
| 133 | pub fn scan_file_full(path: &Path) -> ScanResult { |
| 134 | let Ok(content) = std::fs::read(path) else { |
| 135 | return ScanResult::default(); |
| 136 | }; |
| 137 | if content.is_empty() { |
| 138 | return ScanResult::default(); |
| 139 | } |
| 140 | find_symbols(&content) |
| 141 | } |
| 142 | |
| 143 | /// Return the number of available CPU cores, capped at a sensible |
| 144 | /// default. Used to size parallel scanning batches. |
nothing calls this directly
no test coverage detected