Make Index->references private again
parent
825c67159e
commit
eef824488e
|
@ -26,7 +26,7 @@ class Index implements ReadableIndex, \Serializable
|
||||||
*
|
*
|
||||||
* @var string[][]
|
* @var string[][]
|
||||||
*/
|
*/
|
||||||
public $references = [];
|
private $references = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
|
@ -150,6 +150,17 @@ class Index implements ReadableIndex, \Serializable
|
||||||
return $this->references[$fqn] ?? [];
|
return $this->references[$fqn] ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For test use.
|
||||||
|
* Returns all references, keyed by fqn.
|
||||||
|
*
|
||||||
|
* @return string[][]
|
||||||
|
*/
|
||||||
|
public function getReferences(): array
|
||||||
|
{
|
||||||
|
return $this->references;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a document URI as a referencee of a specific symbol
|
* Adds a document URI as a referencee of a specific symbol
|
||||||
*
|
*
|
||||||
|
|
|
@ -103,7 +103,7 @@ class ValidationTest extends TestCase
|
||||||
|
|
||||||
$document = new PhpDocument($filename, $fileContents, $index, $parser, $docBlockFactory, $definitionResolver);
|
$document = new PhpDocument($filename, $fileContents, $index, $parser, $docBlockFactory, $definitionResolver);
|
||||||
|
|
||||||
$actualRefs = $index->references;
|
$actualRefs = $index->getReferences();
|
||||||
$this->filterSkippedReferences($actualRefs);
|
$this->filterSkippedReferences($actualRefs);
|
||||||
$actualDefs = $this->getTestValuesFromDefs($document->getDefinitions());
|
$actualDefs = $this->getTestValuesFromDefs($document->getDefinitions());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue