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

Function owner_kind_keyword

src/hover/formatting.rs:269–276  ·  view source on GitHub ↗

Return the PHP keyword for a class-like owner. Produces `"class"`, `"interface"`, `"trait"`, or `"enum"`.

(owner: &ClassInfo)

Source from the content-addressed store, hash-verified

267///
268/// Produces `"class"`, `"interface"`, `"trait"`, or `"enum"`.
269pub(super) fn owner_kind_keyword(owner: &ClassInfo) -> &'static str {
270 match owner.kind {
271 ClassLikeKind::Interface => "interface",
272 ClassLikeKind::Trait => "trait",
273 ClassLikeKind::Enum => "enum",
274 _ => "class",
275 }
276}
277
278/// Return the suffix after the owner name for backed enums (e.g. `": string"`).
279///

Callers 3

hover_for_methodMethod · 0.85
hover_for_propertyMethod · 0.85
hover_for_constantMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected