From 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 10 Jan 2025 08:13:09 +0100 Subject: Reduce undeeded use of elvis operator ?: (#7204) --- app/Models/Context.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Models/Context.php') 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) { -- cgit v1.2.3