From a6a2ee72dcf5048affed51b53ff8e5559714cc9a Mon Sep 17 00:00:00 2001 From: Vasily Belosloodcev Date: Sat, 20 Jul 2019 03:30:14 +0500 Subject: [PATCH] 1.0.1 --- src/NestedSetRepositoryAbstract.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/NestedSetRepositoryAbstract.php b/src/NestedSetRepositoryAbstract.php index ed5e8dd..71a11b2 100644 --- a/src/NestedSetRepositoryAbstract.php +++ b/src/NestedSetRepositoryAbstract.php @@ -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) { @@ -115,6 +121,10 @@ public function findAncestors(NestedSetInterface $entity): array ->getResult(); } + /** + * @return int + * @throws \Doctrine\ORM\NonUniqueResultException + */ public function getNextRootLeftKey(): int { /** @var NestedSetInterface $entity */