diff --git a/src/DocIndexer.php b/src/DocIndexer.php index e172ed6c..128bc38a 100644 --- a/src/DocIndexer.php +++ b/src/DocIndexer.php @@ -203,10 +203,11 @@ private function def( 'documentation' => $doc, ]); $this->occurrences[] = new Occurrence([ - 'range' => $pos->pos($posNode), - 'symbol' => $symbol, - 'symbol_roles' => SymbolRole::Definition, - 'syntax_kind' => $kind, + 'range' => $pos->pos($posNode), + 'symbol' => $symbol, + 'symbol_roles' => SymbolRole::Definition, + 'syntax_kind' => $kind, + 'enclosing_range' => $pos->enclosingRange($n), ]); } diff --git a/src/Parser/PosResolver.php b/src/Parser/PosResolver.php index 234a7649..5d052f45 100644 --- a/src/Parser/PosResolver.php +++ b/src/Parser/PosResolver.php @@ -7,6 +7,8 @@ use InvalidArgumentException; use PhpParser\Comment; use PhpParser\Node; +use PhpParser\Node\Const_; +use PhpParser\Node\PropertyItem; use RuntimeException; use function explode; @@ -44,6 +46,34 @@ public function pos(Node|Comment $n): array ]; } + /** + * Resolves the enclosing range of a definition node, including + * any leading doc comment. + * + * @return array{int, int, int, int} + */ + public function enclosingRange(Node $n): array + { + // For Const_ and PropertyItem, the doc comment and full statement + // range live on the parent node (ClassConst / Property). + $node = $n; + if (($n instanceof Const_ || $n instanceof PropertyItem) && $n->getAttribute('parent') instanceof Node) { + $node = $n->getAttribute('parent'); + } + + $doc = $node->getDocComment(); + if ($doc !== null) { + return [ + $doc->getStartLine() - 1, + $this->toColumn($doc->getStartFilePos()) - 1, + $node->getEndLine() - 1, + $this->toColumn($node->getEndFilePos()), + ]; + } + + return $this->pos($node); + } + /** * @param non-empty-string $tagName * @param non-empty-string $name diff --git a/tests/Indexer/testdata/golden/src/ClassA.php b/tests/Indexer/testdata/golden/src/ClassA.php old mode 100644 new mode 100755 index 0b6157a1..122e5467 --- a/tests/Indexer/testdata/golden/src/ClassA.php +++ b/tests/Indexer/testdata/golden/src/ClassA.php @@ -4,6 +4,7 @@ namespace TestData; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# class ClassA // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# // documentation @@ -11,6 +12,7 @@ class ClassA // > class ClassA // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. private ClassB $a1; // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. @@ -18,14 +20,18 @@ class ClassA // > ```php // > private \TestData\ClassB $a1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a2. protected int $a2; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a2. // documentation // > ```php // > protected int $a2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a1(). public function a1(): ?int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a1(). // documentation @@ -54,7 +60,9 @@ public function a1(): ?int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c2. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a2. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a1(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a2(). public function a2(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a2(). // documentation @@ -94,7 +102,9 @@ public function a2(): int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#B1. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a2(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a3(). public function a3(): void // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a3(). // documentation @@ -113,7 +123,9 @@ public function a3(): void // ^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG# // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G2. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a3(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a4(). public function a4(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a4(). // documentation @@ -144,12 +156,16 @@ public function a4(): int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f2(). // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a1(). $v4 = (new class($v3) { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#$z1. public int $z1; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#$z1. // documentation // > ```php // > public int $z1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#$z1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#__construct(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#__construct().($p) public function __construct(?int $p) { $this->z1 = $p; } // ^^^^^^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#__construct(). // documentation @@ -162,6 +178,8 @@ public function __construct(?int $p) { $this->z1 = $p; } // > ?int $p // > ``` // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#$z1. +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#__construct().($p) +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#__construct(). })->z1; // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/anon-class-447#$z1. $v5 = (new class($v3) extends ClassF {})->f1; @@ -193,7 +211,7 @@ public function __construct(?int $p) { $this->z1 = $p; } 1 => $this->a1, // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. PHP_MAJOR_VERSION => $this->a1?->b1, -// ^^^^^^^^^^^^^^^^^ reference scip-php composer php 8.4.15 PHP_MAJOR_VERSION. +// ^^^^^^^^^^^^^^^^^ reference scip-php composer php 8.3.19 PHP_MAJOR_VERSION. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b1. })->b2; @@ -204,5 +222,7 @@ public function __construct(?int $p) { $this->z1 = $p; } // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#$a1. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c1. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a4(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# diff --git a/tests/Indexer/testdata/golden/src/ClassB.php b/tests/Indexer/testdata/golden/src/ClassB.php old mode 100644 new mode 100755 index 0c7d74a7..c46327af --- a/tests/Indexer/testdata/golden/src/ClassB.php +++ b/tests/Indexer/testdata/golden/src/ClassB.php @@ -4,6 +4,7 @@ namespace TestData; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# final class ClassB // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# // documentation @@ -11,13 +12,16 @@ final class ClassB // > final class ClassB // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#B1. public const B1 = 42; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#B1. // documentation // > ```php // > public B1 = 42 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#B1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b1. public static ?ClassC $b1; // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC# // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b1. @@ -25,14 +29,20 @@ final class ClassB // > ```php // > public static ?\TestData\ClassC $b1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b2. public int $b2; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b2. // documentation // > ```php // > public int $b2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#$b2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1().($p1) +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1().($p2) public function b1(int $p1, ClassD|ClassF $p2): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1(). // documentation @@ -51,6 +61,8 @@ public function b1(int $p1, ClassD|ClassF $p2): int // > ```php // > \TestData\ClassD|\TestData\ClassF $p2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1().($p1) +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1().($p2) { return self::$b1->c2->d2 * $p1; // ^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# @@ -58,7 +70,9 @@ public function b1(int $p1, ClassD|ClassF $p2): int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c2. // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d2. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b1(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b2(). public function b2(): void // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b2(). // documentation @@ -79,5 +93,7 @@ public function b2(): void // ^^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ# // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ#J3. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB#b2(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# diff --git a/tests/Indexer/testdata/golden/src/ClassC.php b/tests/Indexer/testdata/golden/src/ClassC.php old mode 100644 new mode 100755 index ede39a4c..7012f01e --- a/tests/Indexer/testdata/golden/src/ClassC.php +++ b/tests/Indexer/testdata/golden/src/ClassC.php @@ -4,6 +4,7 @@ namespace TestData; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC# final class ClassC // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC# // documentation @@ -14,13 +15,16 @@ final class ClassC use TraitE; // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE# +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c1. public string $c1; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c1. // documentation // > ```php // > public string $c1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c2. public ClassB|ClassD $c2; // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassB# // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD# @@ -29,7 +33,9 @@ final class ClassC // > ```php // > public \TestData\ClassB|\TestData\ClassD $c2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#c1(). public function c1(): ClassB|ClassD // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#c1(). // documentation @@ -42,5 +48,7 @@ public function c1(): ClassB|ClassD return $this->c2; // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#$c2. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC#c1(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassC# diff --git a/tests/Indexer/testdata/golden/src/ClassD.php b/tests/Indexer/testdata/golden/src/ClassD.php old mode 100644 new mode 100755 index 0f1dbe26..3c80516d --- a/tests/Indexer/testdata/golden/src/ClassD.php +++ b/tests/Indexer/testdata/golden/src/ClassD.php @@ -4,6 +4,7 @@ namespace TestData; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD# /** * @property $d3 * @property-read ClassB $d4 @@ -27,12 +28,14 @@ final class ClassD extends ClassA // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#__construct(). public function __construct( // ^^^^^^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#__construct(). // documentation // > ```php // > public function __construct(public readonly \TestData\ClassF $d1, public readonly int $d2) // > ``` +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d1. public readonly ClassF $d1, // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d1. @@ -40,16 +43,22 @@ public function __construct( // > ```php // > public readonly \TestData\ClassF $d1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d2. public readonly int $d2, // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d2. // documentation // > ```php // > public readonly int $d2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#$d2. ) { } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD#__construct(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassD# +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ# final readonly class ClassJ // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ# // documentation @@ -57,11 +66,14 @@ public function __construct( // > final readonly class ClassJ // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ#J0. public const J0 = 42; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ#J0. // documentation // > ```php // > public J0 = 42 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ#J0. } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassJ# diff --git a/tests/Indexer/testdata/golden/src/ClassF.php b/tests/Indexer/testdata/golden/src/ClassF.php old mode 100644 new mode 100755 index 0da0b8bc..f37160e1 --- a/tests/Indexer/testdata/golden/src/ClassF.php +++ b/tests/Indexer/testdata/golden/src/ClassF.php @@ -5,8 +5,9 @@ namespace TestData; use function strlen; -// ^^^^^^ reference scip-php composer php 8.4.15 strlen(). +// ^^^^^^ reference scip-php composer php 8.3.19 strlen(). +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# /** @method ClassA m1(int $p1, $p2, bool $p3) */ // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#m1(). final class ClassF @@ -18,13 +19,16 @@ final class ClassF // documentation // > @method ClassA m1(int $p1, $p2, bool $p3) { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f1. public readonly int $f1; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f1. // documentation // > ```php // > public readonly int $f1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f2. public EnumG $f2; // ^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG# // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f2. @@ -32,7 +36,9 @@ final class ClassF // > ```php // > public \TestData\EnumG $f2 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f3. private static ClassA $f3; // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f3. @@ -40,7 +46,9 @@ final class ClassF // > ```php // > private static \TestData\ClassA $f3 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f3. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f1(). public function f1(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f1(). // documentation @@ -50,9 +58,11 @@ public function f1(): int { return $this->f1 + 42 + strlen('ABC'); // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f1. -// ^^^^^^ reference scip-php composer php 8.4.15 strlen(). +// ^^^^^^ reference scip-php composer php 8.3.19 strlen(). } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f1(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f2(). public static function f2(): ClassA // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f2(). // documentation @@ -65,10 +75,13 @@ public static function f2(): ClassA // ^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# // ^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#$f3. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f2(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# namespace TestData3; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ# final class ClassJ // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ# // documentation @@ -76,11 +89,14 @@ final class ClassJ // > final class ClassJ // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ#J1. public const J1 = 42; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ#J1. // documentation // > ```php // > public J1 = 42 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ#J1. } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData3/ClassJ# diff --git a/tests/Indexer/testdata/golden/src/ClassH.php b/tests/Indexer/testdata/golden/src/ClassH.php old mode 100644 new mode 100755 index 746e8bec..a63c4877 --- a/tests/Indexer/testdata/golden/src/ClassH.php +++ b/tests/Indexer/testdata/golden/src/ClassH.php @@ -5,17 +5,19 @@ namespace TestData { use Exception; -// ^^^^^^^^^ reference scip-php composer php 8.4.15 Exception# +// ^^^^^^^^^ reference scip-php composer php 8.3.19 Exception# +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH# final class ClassH extends Exception // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH# // documentation // > ```php // > final class ClassH extends Exception // > ``` -// ^^^^^^^^^ reference scip-php composer php 8.4.15 Exception# +// ^^^^^^^^^ reference scip-php composer php 8.3.19 Exception# { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#__construct(). public function __construct() // ^^^^^^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#__construct(). // documentation @@ -24,10 +26,12 @@ public function __construct() // > ``` { parent::__construct(); -// ^^^^^^ reference scip-php composer php 8.4.15 Exception# -// ^^^^^^^^^^^ reference scip-php composer php 8.4.15 Exception#__construct(). +// ^^^^^^ reference scip-php composer php 8.3.19 Exception# +// ^^^^^^^^^^^ reference scip-php composer php 8.3.19 Exception#__construct(). } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#__construct(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#h1(). public function h1(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#h1(). // documentation @@ -40,17 +44,20 @@ public function h1(): int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF#f2(). // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a2(). return $this->getCode() + fun2()->a2() * $x; -// ^^^^^^^ reference scip-php composer php 8.4.15 Exception#getCode(). +// ^^^^^^^ reference scip-php composer php 8.3.19 Exception#getCode(). // ^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 fun2(). // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA#a2(). } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH#h1(). } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassH# } // https://www.php.net/manual/en/language.namespaces.definitionmultiple.php namespace TestData2 { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ# final class ClassJ // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ# // documentation @@ -58,17 +65,21 @@ final class ClassJ // > final class ClassJ // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ#J2. public const J2 = 42; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ#J2. // documentation // > ```php // > public J2 = 42 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ#J2. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData2/ClassJ# } namespace { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ# final class ClassJ // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ# // documentation @@ -76,12 +87,15 @@ final class ClassJ // > final class ClassJ // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ#J3. public const J3 = 42; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ#J3. // documentation // > ```php // > public J3 = 42 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ#J3. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 ClassJ# } diff --git a/tests/Indexer/testdata/golden/src/EnumG.php b/tests/Indexer/testdata/golden/src/EnumG.php old mode 100644 new mode 100755 index 9e243b8c..3d918911 --- a/tests/Indexer/testdata/golden/src/EnumG.php +++ b/tests/Indexer/testdata/golden/src/EnumG.php @@ -4,6 +4,7 @@ namespace TestData; +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG# enum EnumG: string // ^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG# // documentation @@ -11,25 +12,32 @@ enum EnumG: string // > enum EnumG // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G1. case G1 = 'g1'; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G1. // documentation // > ```php // > case G1 = 'g1'; // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G2. case G2 = 'g2'; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G2. // documentation // > ```php // > case G2 = 'g2'; // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G3. case G3 = 'g3'; // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G3. // documentation // > ```php // > case G3 = 'g3'; // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG#G3. } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/EnumG# diff --git a/tests/Indexer/testdata/golden/src/TraitE.php b/tests/Indexer/testdata/golden/src/TraitE.php old mode 100644 new mode 100755 index 49dbc29e..f43f350f --- a/tests/Indexer/testdata/golden/src/TraitE.php +++ b/tests/Indexer/testdata/golden/src/TraitE.php @@ -7,6 +7,7 @@ use Test\Dep\ClassI; // ^^^^^^^^^^^^^^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI# +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE# trait TraitE // ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE# // documentation @@ -14,13 +15,16 @@ trait TraitE // > trait TraitE // > ``` { +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e1. public int $e1; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e1. // documentation // > ```php // > public int $e1 // > ``` +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e1. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2. /** @var ClassI */ public $e2; // ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2. @@ -30,7 +34,9 @@ trait TraitE // > ``` // documentation // > @var ClassI +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2. +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e1(). protected function e1(): bool // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e1(). // documentation @@ -42,7 +48,9 @@ protected function e1(): bool // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2. // ^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#$i1. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e1(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e2(). public function e2(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e2(). // documentation @@ -57,7 +65,9 @@ public function e2(): int // ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2. // ^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#I1. } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e2(). +// ⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e3(). public function e3(): int // ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e3(). // documentation @@ -67,12 +77,14 @@ public function e3(): int { if (true) { return 23 - count([0]); -// ^^^^^ reference scip-php composer php 8.4.15 count(). +// ^^^^^ reference scip-php composer php 8.3.19 count(). } if (false) { return 42; } return -1; } +// ⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e3(). } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE# diff --git a/tests/Indexer/testdata/golden/src/func2.php b/tests/Indexer/testdata/golden/src/func2.php old mode 100644 new mode 100755 index 0a641417..57f7a492 --- a/tests/Indexer/testdata/golden/src/func2.php +++ b/tests/Indexer/testdata/golden/src/func2.php @@ -5,6 +5,7 @@ use TestData\ClassA; // ^^^^^^^^^^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 fun2(). function fun2(): ClassA // ^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 fun2(). // documentation @@ -16,4 +17,5 @@ function fun2(): ClassA return new ClassA(); // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassA# } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 fun2(). diff --git a/tests/Indexer/testdata/golden/src/func3.php b/tests/Indexer/testdata/golden/src/func3.php old mode 100644 new mode 100755 index fd07c315..5ad3ec8a --- a/tests/Indexer/testdata/golden/src/func3.php +++ b/tests/Indexer/testdata/golden/src/func3.php @@ -7,6 +7,7 @@ use TestData\ClassF; // ^^^^^^^^^^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# +//⌄ enclosing_range_start scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData4/fun2(). /** @return ClassF */ function fun2() // ^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData4/fun2(). @@ -20,4 +21,5 @@ function fun2() return new ClassF(); // ^^^^^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/ClassF# } +//⌃ enclosing_range_end scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData4/fun2().