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

Function resolve_target_classes

src/completion/resolver.rs:336–343  ·  view source on GitHub ↗

Resolve a completion subject to all candidate types, preserving both class info and type strings. This is the primary entry point for subject resolution. It returns `Vec ` which carries both the structured type string (e.g. `PhpType::Named("Collection")`) and the optional `ClassInfo`. Callers that only need classes can call `ResolvedType::into_arced_classes()` on the result.

(
    subject: &str,
    access_kind: AccessKind,
    ctx: &ResolutionCtx<'_>,
)

Source from the content-addressed store, hash-verified

334/// Callers that only need classes can call
335/// `ResolvedType::into_arced_classes()` on the result.
336pub(crate) fn resolve_target_classes(
337 subject: &str,
338 access_kind: AccessKind,
339 ctx: &ResolutionCtx<'_>,
340) -> Vec<ResolvedType> {
341 let expr = SubjectExpr::parse(subject);
342 resolve_target_classes_expr(&expr, access_kind, ctx)
343}
344
345/// Core dispatch for [`resolve_target_classes`], operating on a
346/// pre-parsed [`SubjectExpr`].

Calls 1

Tested by

no test coverage detected