arangodb-php
arangodb-php copied to clipboard
ArangoDBClient\GraphHandler\saveEdge PHPDoc Issue
trafficstars
I might be misunderstanding or missing something...so preemptively sorry.
The PHPdoc for ArangoDBClient\GraphHandler\saveEdge states that:
@param string $collection - if one uses a graph with more than one vertex collection one must provide the collection
I believe that "vertex" should be "edge", specifically because it initially confused me then I saw that the associated code is:
if ($collection === null) {
$edgeCollections = $this->getEdgeCollections($graph);
$edgeCollectionsCount = count($edgeCollections);
if ($edgeCollectionsCount !== 1) {
throw new ClientException('A collection must be provided.');
}
if ($edgeCollectionsCount === 1) {
$collection = $edgeCollections[0];
}
}
Link to relevant docs: https://github.com/arangodb/arangodb-php/blob/69d557f38f364a1f5f922576dd2a3f4a90c2fa7d/lib/ArangoDBClient/GraphHandler.php#L1019