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

Function apply_substitution_to_property

src/inheritance.rs:1234–1241  ·  view source on GitHub ↗

Apply generic type substitution to a property's type hint.

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

Source from the content-addressed store, hash-verified

1232
1233/// Apply generic type substitution to a property's type hint.
1234pub(crate) fn apply_substitution_to_property(
1235 property: &mut PropertyInfo,
1236 subs: &HashMap<String, PhpType>,
1237) {
1238 if let Some(ref mut hint) = property.type_hint {
1239 *hint = hint.substitute(subs);
1240 }
1241}
1242
1243/// Apply a substitution map to a type string.
1244///

Callers 5

merge_traits_intoFunction · 0.85
apply_generic_argsFunction · 0.85
collect_mixin_membersFunction · 0.85

Calls 1

substituteMethod · 0.80

Tested by

no test coverage detected