Commit 30b9a80b authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

refactor(16379) : avoid unnecessary instructions

parent ad193707
Pipeline #16511 failed with stages
in 37 seconds
......@@ -786,14 +786,7 @@ trait archiveEntryTrait
public function getParentAndSiblingIds($archive) {
$result = [];
if (!empty($archive->parentArchiveId)) {
$parentArchive = $this->sdoFactory->read('recordsManagement/archive', $archive->parentArchiveId);
$parentArchiveId = (string) $parentArchive->archiveId;
array_push($result, $parentArchiveId);
$childrenArchiveIds = $this->getChildrenArchives($parentArchiveId);
$result = array_merge($result,$childrenArchiveIds);
} else {
$archiveId = (string) $archive->archiveId;
array_push($result, $archiveId);
$result = array_merge([$archive->parentArchiveId], $this->getChildrenArchives($archive->parentArchiveId));
}
return $result;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment