From e9e9b8956d202fbcb91632e6600428d31526d7ab Mon Sep 17 00:00:00 2001 From: "Lucas S. Vieira" Date: Wed, 15 May 2024 23:42:07 +0100 Subject: [PATCH] type checks for 'Graph' namespace --- src/Graph/Graph.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Graph/Graph.php b/src/Graph/Graph.php index ef37515..fc51c8c 100644 --- a/src/Graph/Graph.php +++ b/src/Graph/Graph.php @@ -7,7 +7,6 @@ use ArangoDB\Document\Edge; use ArangoDB\Document\Vertex; use ArangoDB\Database\Database; -use ArangoDB\Cursor\TraversalCursor; use ArangoDB\DataStructures\ArrayList; use ArangoDB\Graph\Traversal\Traversal; use GuzzleHttp\Exception\ClientException; @@ -403,7 +402,7 @@ public function addEdgeDefinition(string $collection, array $from, array $to): b } /** - * Remove one edge definition from the graph.
+ * Remove one edge definition from the graph
* This will only remove the edge collection, * the vertex collections remain untouched and can still be used in your queries. * @@ -521,7 +520,7 @@ public function addVertexCollection(string $collection): bool } /** - * Removes a vertex collection from the graph and optionally deletes the collection, if it is not used in any other graph.
+ * Removes a vertex collection from the graph and optionally deletes the collection, if it is not used in any other graph
* It can only remove vertex collections that are no longer part of edge definitions,
* if they are used in edge definitions you are required to modify those first. * @@ -727,15 +726,15 @@ public function getEdge(string $collection, string $edge) /** * Creates a new edge in the collection.
- * Within the attributes the edge has to contain a _from and _to value referencing to valid vertices in the graph. - * Furthermore the edge has to be valid in the definition of the used. + * Within the attributes the edge has to contain a _from and _to value referencing to valid vertices in the graph + * Furthermore, the edge has to be valid in the definition of the used. * * @param string $collection The name of the edge collection the edge belongs to. - * @param array $attributes The object attributes to be stored. Must contains '_to' and '_from' keys. + * @param array $attributes The object attributes to be stored. Must contain '_to' and '_from' keys. * @param bool $waitForSync Define if the request should wait until synced to disk. Default is true. * @param bool $returnNew Define if the response should contain the complete new version of the document. Default is false. * - * @return Edge|false A Edge object if edge exists. False if no graph with this name could be found
+ * @return bool True if Edge object exists. False if no graph with this name could be found
* or this collection is not part of the graph or one of the vertices ('_to' or '_from') does not exist. * * @throws DatabaseException|GuzzleException|ArangoException @@ -820,7 +819,7 @@ public function dropEdge(string $collection, string $edge, bool $waitForSync = t * @param int $depth Visits only nodes in at least the given depth. * @param string $direction Direction for traversal. Must be either "outbound", "inbound", or "any". * - * @return TraversalCursor + * @return Traversal * * @throws CursorException|GuzzleException|ArangoException */