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

Function collect_with_version

src/diagnostics/unused_variables.rs:524–532  ·  view source on GitHub ↗

Helper: same as `collect` but with a specific PHP version.

(php: &str, version: PhpVersion)

Source from the content-addressed store, hash-verified

522
523 /// Helper: same as `collect` but with a specific PHP version.
524 fn collect_with_version(php: &str, version: PhpVersion) -> Vec<Diagnostic> {
525 let backend = Backend::new_test();
526 backend.set_php_version(version);
527 let uri = "file:///test.php";
528 backend.update_ast(uri, php);
529 let mut out = Vec::new();
530 backend.collect_unused_variable_diagnostics(uri, php, &mut out);
531 out
532 }
533
534 // ═══════════════════════════════════════════════════════════════
535 // PHP version gating for catch variables

Callers 2

Calls 3

set_php_versionMethod · 0.80
update_astMethod · 0.80

Tested by 2