aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Context.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-10 08:13:09 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-10 08:13:09 +0100
commit5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch)
treedecb975aa750660cea965bf61399df2335493b9d /app/Models/Context.php
parent3280ec617f8081bf0d5349e441ae564a42fdc500 (diff)
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'app/Models/Context.php')
-rw-r--r--app/Models/Context.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php
index 0c8161c8b..8bee4630a 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -177,7 +177,7 @@ final class FreshRSS_Context {
public static function categories(): array {
if (empty(self::$categories)) {
$catDAO = FreshRSS_Factory::createCategoryDao();
- self::$categories = $catDAO->listSortedCategories(true, false);
+ self::$categories = $catDAO->listSortedCategories(prePopulateFeeds: true, details: false);
}
return self::$categories;
}
@@ -191,7 +191,7 @@ final class FreshRSS_Context {
public static function labels(bool $precounts = false): array {
if (empty(self::$tags) || $precounts) {
$tagDAO = FreshRSS_Factory::createTagDao();
- self::$tags = $tagDAO->listTags($precounts) ?: [];
+ self::$tags = $tagDAO->listTags($precounts);
}
return self::$tags;
}
@@ -400,7 +400,7 @@ final class FreshRSS_Context {
if (empty(self::$categories)) {
$catDAO = FreshRSS_Factory::createCategoryDao();
$details = $type === 'f'; // Load additional feed details in the case of feed view
- self::$categories = $catDAO->listCategories(true, $details);
+ self::$categories = $catDAO->listCategories(prePopulateFeeds: true, details: $details);
}
switch ($type) {
@@ -505,7 +505,7 @@ final class FreshRSS_Context {
if (empty(self::$categories)) {
$catDAO = FreshRSS_Factory::createCategoryDao();
- self::$categories = $catDAO->listCategories(true);
+ self::$categories = $catDAO->listCategories(prePopulateFeeds: true);
}
if (FreshRSS_Context::userConf()->onread_jump_next && strlen($get) > 2) {