Scan a single PHP file and return the fully-qualified class names it defines. Returns an empty `Vec` when the file cannot be read, is empty, or contains no class-like declarations.
(path: &Path)
| 104 | /// Returns an empty `Vec` when the file cannot be read, is empty, or |
| 105 | /// contains no class-like declarations. |
| 106 | pub fn scan_file(path: &Path) -> Vec<String> { |
| 107 | let Ok(content) = std::fs::read(path) else { |
| 108 | return Vec::new(); |
| 109 | }; |
| 110 | if content.is_empty() { |
| 111 | return Vec::new(); |
| 112 | } |
| 113 | find_classes(&content) |
| 114 | } |
| 115 | |
| 116 | /// Scan already-loaded file content and return the fully-qualified class |
| 117 | /// names it defines. |
nothing calls this directly
no test coverage detected