Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bupy7 committed Jul 19, 2019
1 parent 28c1702 commit a6a2ee7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/NestedSetRepositoryAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public function findDescendants(NestedSetInterface $entity): array
->getResult();
}

/**
* @param NestedSetInterface $entity
*
* @return NestedSetInterface|null
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function findOneParent(NestedSetInterface $entity): ?NestedSetInterface
{
if ($entity->getLevel() - 1 <= 0) {
Expand Down Expand Up @@ -115,6 +121,10 @@ public function findAncestors(NestedSetInterface $entity): array
->getResult();
}

/**
* @return int
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function getNextRootLeftKey(): int
{
/** @var NestedSetInterface $entity */
Expand Down

0 comments on commit a6a2ee7

Please sign in to comment.