(
context: &DocblockContext,
sym: &SymbolInfo,
indent: &str,
content: &str,
position: Position,
_use_map: &HashMap<String, String>,
_file_namespace: &Option<String>,
lo
| 1272 | /// filtered out by the caller before we get here. |
| 1273 | #[allow(clippy::too_many_arguments)] |
| 1274 | fn build_docblock_snippet( |
| 1275 | context: &DocblockContext, |
| 1276 | sym: &SymbolInfo, |
| 1277 | indent: &str, |
| 1278 | content: &str, |
| 1279 | position: Position, |
| 1280 | _use_map: &HashMap<String, String>, |
| 1281 | _file_namespace: &Option<String>, |
| 1282 | local_classes: &[Arc<ClassInfo>], |
| 1283 | class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>, |
| 1284 | function_loader: FunctionLoader<'_>, |
| 1285 | ) -> String { |
| 1286 | match context { |
| 1287 | DocblockContext::FunctionOrMethod => build_function_snippet( |
| 1288 | sym, |
| 1289 | indent, |
| 1290 | content, |
| 1291 | position, |
| 1292 | _use_map, |
| 1293 | _file_namespace, |
| 1294 | local_classes, |
| 1295 | class_loader, |
| 1296 | function_loader, |
| 1297 | ), |
| 1298 | DocblockContext::ClassLike => build_class_snippet(sym, indent, class_loader), |
| 1299 | DocblockContext::Property => build_property_snippet(sym, indent, class_loader), |
| 1300 | DocblockContext::Constant => build_constant_snippet(sym, indent, class_loader), |
| 1301 | // Inline and Unknown are early-returned by the caller. |
| 1302 | DocblockContext::Inline | DocblockContext::Unknown => String::new(), |
| 1303 | } |
| 1304 | } |
| 1305 | |
| 1306 | /// Build a docblock snippet for a function or method. |
| 1307 | /// |
no test coverage detected