From a1fc6b50ed96f98d4fed0dc7c86e5a080b80129e Mon Sep 17 00:00:00 2001 From: Stephan Unverwerth Date: Sat, 10 Jun 2017 11:23:23 +0200 Subject: [PATCH] Revert "Find references on unused symbol must not load referenced URIs" This reverts commit 258b905d9fa05a6a1ce6714c366d780f913b5eb2. --- src/Server/TextDocument.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Server/TextDocument.php b/src/Server/TextDocument.php index 982a245..2e8e4bf 100644 --- a/src/Server/TextDocument.php +++ b/src/Server/TextDocument.php @@ -221,18 +221,15 @@ class TextDocument return []; } } - $referenceUris = $this->index->getReferenceUris($fqn); - if (!empty($referenceUris)) { - $refDocuments = yield Promise\all(array_map( - [$this->documentLoader, 'getOrLoad'], - $referenceUris - )); - foreach ($refDocuments as $document) { - $refs = $document->getReferenceNodesByFqn($fqn); - if ($refs !== null) { - foreach ($refs as $ref) { - $locations[] = Location::fromNode($ref); - } + $refDocuments = yield Promise\all(array_map( + [$this->documentLoader, 'getOrLoad'], + $this->index->getReferenceUris($fqn) + )); + foreach ($refDocuments as $document) { + $refs = $document->getReferenceNodesByFqn($fqn); + if ($refs !== null) { + foreach ($refs as $ref) { + $locations[] = Location::fromNode($ref); } } }