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

Function make_subs

src/inheritance_tests.rs:7–12  ·  view source on GitHub ↗

Helper to build a `HashMap ` from `(&str, &str)` pairs.

(pairs: &[(&str, &str)])

Source from the content-addressed store, hash-verified

5
6/// Helper to build a `HashMap<String, PhpType>` from `(&str, &str)` pairs.
7fn make_subs(pairs: &[(&str, &str)]) -> HashMap<String, PhpType> {
8 pairs
9 .iter()
10 .map(|(k, v)| (k.to_string(), PhpType::parse(v)))
11 .collect()
12}
13
14#[test]
15fn test_apply_substitution_direct() {

Calls 2

iterMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected