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

Function classify_range_this_detection

src/scope_collector/tests.rs:771–784  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

769
770#[test]
771fn classify_range_this_detection() {
772 let php = r#"<?php
773class Foo {
774 public function test() {
775 $x = $this->bar();
776 }
777}
778"#;
779 let scope_map = collect_from_method(php);
780
781 let frame = &scope_map.frames[0];
782 let classification = scope_map.classify_range(frame.start, frame.end);
783 assert!(classification.uses_this);
784}
785
786#[test]
787fn classify_range_no_this() {

Callers

nothing calls this directly

Calls 2

collect_from_methodFunction · 0.85
classify_rangeMethod · 0.80

Tested by

no test coverage detected