From f960adc0c020c8f3be5296b118ed91af0aee46f7 Mon Sep 17 00:00:00 2001 From: Jason Gillman Jr Date: Tue, 4 Mar 2014 12:12:03 -0500 Subject: [PATCH] getLength() actually returns the number of relatioships in a path. Addresses issue #127 --- lib/Everyman/Neo4j/Path.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Everyman/Neo4j/Path.php b/lib/Everyman/Neo4j/Path.php index 798e496..7407a7d 100644 --- a/lib/Everyman/Neo4j/Path.php +++ b/lib/Everyman/Neo4j/Path.php @@ -36,7 +36,7 @@ public function appendRelationship(Relationship $rel) } /** - * Get the number of relationships in this path + * Get the number of relationships or nodes in this path depending on the context set * * @return integer */ @@ -76,7 +76,7 @@ public function getEndNode() */ public function getLength() { - return $this->count(); + return count($this->relationships); } /**