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

Method ctor_params_for

src/completion/context/class_completion.rs:1421–1425  ·  view source on GitHub ↗

Load the `__construct` parameters for a class, if available. Tries `load_stub_class` (which checks `uri_classes_index` first, then in-memory stubs) to avoid disk I/O. Returns `None` when the class cannot be found or has no constructor.

(&self, class_name: &str)

Source from the content-addressed store, hash-verified

1419 /// in-memory stubs) to avoid disk I/O. Returns `None` when the
1420 /// class cannot be found or has no constructor.
1421 fn ctor_params_for(&self, class_name: &str) -> Option<Vec<ParameterInfo>> {
1422 let cls = self.load_stub_class(class_name)?;
1423 let ctor = cls.get_method_ci("__construct")?;
1424 Some(ctor.parameters.clone())
1425 }
1426
1427 /// Maximum number of class name completions to return.
1428 ///

Callers 1

Calls 3

load_stub_classMethod · 0.80
get_method_ciMethod · 0.80
cloneMethod · 0.80

Tested by

no test coverage detected