mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Added an comment about the recursive array_merge.
This commit is contained in:
parent
21a81486df
commit
7a9bfdf7f9
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue