Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | function getFolderIds($folderIds) |
||
8 | { |
||
9 | $folders = ensureIsArray($folderIds); |
||
10 | |||
11 | $folderIds = array_map(function (BaseFolderIdType $folderId) { |
||
12 | return $folderId->toArray(true); |
||
13 | }, $folders); |
||
14 | |||
15 | return array_reduce($folderIds, function ($folderIds, $folderId) { |
||
16 | $folderIds[key($folderId)][] = current($folderId); |
||
17 | return $folderIds; |
||
18 | }, []); |
||
19 | } |
||
20 |