Skip to content

Commit 760a825

Browse files
committed
Sort output of $fusion->getSectionsByTypeId()
1 parent 9fe861a commit 760a825

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Model/Fusion.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public function getSectionsByTypeId($typeId)
8989
$sections[] = $section;
9090
}
9191
}
92+
usort($sections, function ($a, $b) {
93+
return $b->getEffectiveAt() > $a->getEffectiveAt();
94+
});
9295
return $sections;
9396
}
9497

0 commit comments

Comments
 (0)