Build a docblock snippet for a constant. Emits a single-line `/** @var Type */` format.
(
sym: &SymbolInfo,
_indent: &str,
class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
)
| 1688 | /// |
| 1689 | /// Emits a single-line `/** @var Type */` format. |
| 1690 | fn build_constant_snippet( |
| 1691 | sym: &SymbolInfo, |
| 1692 | _indent: &str, |
| 1693 | class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>, |
| 1694 | ) -> String { |
| 1695 | let mut tab_stop = 1u32; |
| 1696 | let var_type = property_var_type_snippet(sym.type_hint.as_ref(), &mut tab_stop, class_loader); |
| 1697 | format!("/** @var {} */", var_type) |
| 1698 | } |
| 1699 | |
| 1700 | /// Attempt to infer the type of an inline variable assignment using the |
| 1701 | /// hover type-resolution pipeline. |