1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Sorting: Renamed sort set to sort rule

Renamed based on feedback from Tim and Script on Discord.
Also fixed flaky test
This commit is contained in:
Dan Brown
2025-02-11 14:36:25 +00:00
parent a208c46b62
commit b9306a9029
30 changed files with 232 additions and 224 deletions

View File

@@ -16,7 +16,7 @@ class BookSorter
) {
}
public function runBookAutoSortForAllWithSet(SortSet $set): void
public function runBookAutoSortForAllWithSet(SortRule $set): void
{
$set->books()->chunk(50, function ($books) {
foreach ($books as $book) {
@@ -32,12 +32,12 @@ class BookSorter
*/
public function runBookAutoSort(Book $book): void
{
$set = $book->sortSet;
$set = $book->sortRule;
if (!$set) {
return;
}
$sortFunctions = array_map(function (SortSetOperation $op) {
$sortFunctions = array_map(function (SortRuleOperation $op) {
return $op->getSortFunction();
}, $set->getOperations());