Skip to content

Commit

Permalink
getLength() actually returns the number of relatioships in a path. Ad…
Browse files Browse the repository at this point in the history
…dresses issue jadell#127
  • Loading branch information
jgillmanjr committed Mar 4, 2014
1 parent d63b62a commit f960adc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Everyman/Neo4j/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -76,7 +76,7 @@ public function getEndNode()
*/
public function getLength()
{
return $this->count();
return count($this->relationships);
}

/**
Expand Down

0 comments on commit f960adc

Please sign in to comment.