1
0
Fork 0

allow rename of methods

pull/768/head
Florian Schunk 2019-11-05 20:36:10 +01:00
parent 1f157d7424
commit c54b817ba6
1 changed files with 9 additions and 0 deletions

View File

@ -265,6 +265,15 @@ class TextDocument
$location = LocationFactory::fromNode($ref); $location = LocationFactory::fromNode($ref);
$location->range->start->character++; $location->range->start->character++;
$locations[] = $location; $locations[] = $location;
}elseif ($ref instanceof Node\ClassMembersNode) {
foreach ($ref->classMemberDeclarations as $declaration) {
if ($declaration instanceof Node\MethodDeclaration) {
if ($declaration->getName() === $node->getName()) {
$location = LocationFactory::fromToken($declaration, $declaration->name);
$locations[] = $location;
}
}
}
} }
} }
} }