Added an comment about the recursive array_merge.

This commit is contained in:
Jan Böhmer 2019-09-16 22:23:02 +02:00
parent 21a81486df
commit 7a9bfdf7f9

View file

@ -59,6 +59,12 @@ class StructuralDBElementRepository extends EntityRepository
$entities = $this->findBy(['parent' => $parent], ['name' => 'ASC']);
/**
* I think it is very difficult to replace this recursive array_merge,
* so if you want to change it you should have a better idea than adding each list to $result array
* and do an array_merge(...$result) at the end.
*/
foreach ($entities as $entity) {
/** @var StructuralDBElement $entity */
$result[] = $entity;