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

Method build

src/completion/context/function_completion.rs:83–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 }
82
83 fn build(self) -> CompletionItem {
84 let detail = self.return_type;
85 let data = serde_json::to_value(CompletionItemData {
86 class_name: String::new(),
87 member_name: self.fqn,
88 kind: "function".to_string(),
89 uri: self.uri,
90 extra_class_names: vec![],
91 })
92 .ok();
93 CompletionItem {
94 label: self.label,
95 kind: Some(CompletionItemKind::FUNCTION),
96 detail,
97 insert_text: Some(self.insert_text),
98 insert_text_format: self.insert_text_format,
99 filter_text: Some(self.filter_text),
100 sort_text: Some(self.sort_text),
101 tags: deprecation_tag(self.is_deprecated),
102 additional_text_edits: self.additional_text_edits,
103 data,
104 ..CompletionItem::default()
105 }
106 }
107}
108
109/// Build a minimal function item for use-import context where only

Callers 11

rtFunction · 0.80
discover_user_filesFunction · 0.80
scan_drupal_directoriesFunction · 0.80
collect_php_filesFunction · 0.80
collect_psr4_php_filesFunction · 0.80
collect_php_filesFunction · 0.80
run_fixtureFunction · 0.80

Calls 1

deprecation_tagFunction · 0.85

Tested by

no test coverage detected