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

Function inline_string_literal

src/code_actions/inline_variable.rs:1201–1216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1199
1200 #[test]
1201 fn inline_string_literal() {
1202 let php = r#"<?php
1203function foo() {
1204 /*|*/$msg = 'hello world';
1205 echo $msg;
1206}
1207"#;
1208 let content_without_marker = php.replace("/*|*/", "");
1209 let edits = run_inline(php).expect("action should be offered");
1210 let result = apply_edits(&content_without_marker, &edits);
1211 assert!(
1212 result.contains("echo 'hello world';"),
1213 "string literal should be inlined: got:\n{}",
1214 result
1215 );
1216 }
1217
1218 // ── Pure expression helpers ─────────────────────────────────────
1219

Callers

nothing calls this directly

Calls 2

run_inlineFunction · 0.85
apply_editsFunction · 0.70

Tested by

no test coverage detected