Store the function and constant indices from a workspace scan into the backend's shared maps. Only has an effect for non-Composer projects (the "no `composer.json`" scenario) where the full-scan populates function and constant entries. For Composer projects the scan result's function and constant indices are empty because those symbols are discovered via the `autoload_files.php` scan loop in `in
(&self, scan: &WorkspaceScanResult)
| 2137 | /// symbols are discovered via the `autoload_files.php` scan loop |
| 2138 | /// in `initialized()` instead. |
| 2139 | pub(crate) fn populate_autoload_indices(&self, scan: &WorkspaceScanResult) { |
| 2140 | if !scan.function_index.is_empty() { |
| 2141 | let mut idx = self.autoload_function_index.write(); |
| 2142 | for (fqn, path) in &scan.function_index { |
| 2143 | idx.entry(fqn.clone()).or_insert_with(|| path.clone()); |
| 2144 | } |
| 2145 | } |
| 2146 | if !scan.constant_index.is_empty() { |
| 2147 | let mut idx = self.autoload_constant_index.write(); |
| 2148 | for (name, path) in &scan.constant_index { |
| 2149 | idx.entry(name.clone()).or_insert_with(|| path.clone()); |
| 2150 | } |
| 2151 | } |
| 2152 | } |
| 2153 | } |
no test coverage detected