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); } /**