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

Function format_deprecation_line

src/hover/formatting.rs:38–44  ·  view source on GitHub ↗

Format a deprecation message as a Markdown line for hover output. Returns `"🪦 **deprecated**"` when the message is empty, or `"🪦 **deprecated** Use foo() instead."` when a message is present.

(msg: &str)

Source from the content-addressed store, hash-verified

36/// Returns `"🪦 **deprecated**"` when the message is empty, or
37/// `"🪦 **deprecated** Use foo() instead."` when a message is present.
38pub(super) fn format_deprecation_line(msg: &str) -> String {
39 if msg.is_empty() {
40 "🪦 **deprecated**".to_string()
41 } else {
42 format!("🪦 **deprecated** {}", msg)
43 }
44}
45
46/// Format a visibility keyword.
47pub(super) fn format_visibility(vis: Visibility) -> &'static str {

Callers 6

hover_from_symbolMethod · 0.85
hover_for_methodMethod · 0.85
hover_for_propertyMethod · 0.85
hover_for_constantMethod · 0.85
hover_for_class_infoMethod · 0.85
hover_for_functionFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected