mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Added an comment about the recursive array_merge.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user