Skip to content

Commit

Permalink
Fix: CS
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Jan 4, 2024
1 parent b53723d commit ad66045
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Menu/MenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ private function getPages(int $pid, array $options): ?Collection

$ids = StringUtil::deserialize($options['pages'], true);

if (method_exists(PageModel::class, 'findPublishedRegularByIds')) {
return PageModel::findPublishedRegularByIds($ids, ['includeRoot' => true]);
} else {
if (method_exists(PageModel::class, 'findPublishedRegularWithoutGuestsByIds')) {
return PageModel::findPublishedRegularWithoutGuestsByIds($ids, ['includeRoot' => true]);
}

return PageModel::findPublishedRegularByIds($ids, ['includeRoot' => true]);
}

private function populateMenuItem(MenuItem $item, ?PageModel $requestPage, PageModel $page, $href): MenuItem
Expand Down

0 comments on commit ad66045

Please sign in to comment.