Skip to content

Commit fca9727

Browse files
gharlanfranmomu
authored andcommitted
Remove redundant condition
1 parent 065cb58 commit fca9727

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Tree/Entity/Repository/NestedTreeRepository.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,7 @@ public function getLeafsQueryBuilder($root = null, $sortByField = null, $directi
335335
$config = $this->listener->getConfiguration($this->_em, $meta->getName());
336336

337337
if (isset($config['root']) && null === $root) {
338-
if (null === $root) {
339-
throw new InvalidArgumentException('If tree has root, getLeafs method requires any node of this tree');
340-
}
338+
throw new InvalidArgumentException('If tree has root, getLeafs method requires any node of this tree');
341339
}
342340

343341
$qb = $this->getQueryBuilder();

0 commit comments

Comments
 (0)