MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / build_property_snippet

Function build_property_snippet

src/completion/phpdoc/generation.rs:1677–1685  ·  view source on GitHub ↗

Build a docblock snippet for a property. Emits a single-line `/** @var Type */` format. For missing types, the type is a tab-stop placeholder. For classes with templates, template names are tab-stop placeholders.

(
    sym: &SymbolInfo,
    _indent: &str,
    class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
)

Source from the content-addressed store, hash-verified

1675/// For missing types, the type is a tab-stop placeholder.
1676/// For classes with templates, template names are tab-stop placeholders.
1677fn build_property_snippet(
1678 sym: &SymbolInfo,
1679 _indent: &str,
1680 class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
1681) -> String {
1682 let mut tab_stop = 1u32;
1683 let var_type = property_var_type_snippet(sym.type_hint.as_ref(), &mut tab_stop, class_loader);
1684 format!("/** @var {} */", var_type)
1685}
1686
1687/// Build a docblock snippet for a constant.
1688///

Calls 1