Find references on unused symbol must not load referenced URIs
parent
f10680e441
commit
258b905d9f
|
@ -221,15 +221,18 @@ class TextDocument
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$refDocuments = yield Promise\all(array_map(
|
$referenceUris = $this->index->getReferenceUris($fqn);
|
||||||
[$this->documentLoader, 'getOrLoad'],
|
if (!empty($referenceUris)) {
|
||||||
$this->index->getReferenceUris($fqn)
|
$refDocuments = yield Promise\all(array_map(
|
||||||
));
|
[$this->documentLoader, 'getOrLoad'],
|
||||||
foreach ($refDocuments as $document) {
|
$referenceUris
|
||||||
$refs = $document->getReferenceNodesByFqn($fqn);
|
));
|
||||||
if ($refs !== null) {
|
foreach ($refDocuments as $document) {
|
||||||
foreach ($refs as $ref) {
|
$refs = $document->getReferenceNodesByFqn($fqn);
|
||||||
$locations[] = Location::fromNode($ref);
|
if ($refs !== null) {
|
||||||
|
foreach ($refs as $ref) {
|
||||||
|
$locations[] = Location::fromNode($ref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue