1
0
Fork 0

fix(indexing): handle integer FQNs

pull/616/head
Declspeck 2018-02-25 22:02:54 +02:00 committed by Felix Becker
parent 8adcf92c2f
commit b412c125a4
1 changed files with 3 additions and 1 deletions

View File

@ -160,7 +160,9 @@ class PhpDocument
// Register this document on the project for references // Register this document on the project for references
foreach ($this->referenceNodes as $fqn => $nodes) { foreach ($this->referenceNodes as $fqn => $nodes) {
$this->index->addReferenceUri($fqn, $this->uri); // Cast the key to string. If (string)'2' is set as an array index, it will read out as (int)2. We must
// deal with incorrect code, so this is a valid scenario.
$this->index->addReferenceUri((string)$fqn, $this->uri);
} }
$this->sourceFileNode = $treeAnalyzer->getSourceFileNode(); $this->sourceFileNode = $treeAnalyzer->getSourceFileNode();