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

Function apply_substitution_to_conditional

src/inheritance.rs:1226–1231  ·  view source on GitHub ↗

Apply generic type substitution to a conditional return type tree. Delegates to [`PhpType::substitute`] which recursively walks all type variants (including nested conditionals) and replaces template parameter names with their concrete types.

(
    cond: &mut PhpType,
    subs: &HashMap<String, PhpType>,
)

Source from the content-addressed store, hash-verified

1224/// type variants (including nested conditionals) and replaces template
1225/// parameter names with their concrete types.
1226pub(crate) fn apply_substitution_to_conditional(
1227 cond: &mut PhpType,
1228 subs: &HashMap<String, PhpType>,
1229) {
1230 *cond = cond.substitute(subs);
1231}
1232
1233/// Apply generic type substitution to a property's type hint.
1234pub(crate) fn apply_substitution_to_property(

Callers 2

Calls 1

substituteMethod · 0.80

Tested by

no test coverage detected