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/Controllers/statsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Controllers/statsController.php') diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index ee3df4ea5..7a7180176 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -35,7 +35,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { $catDAO = FreshRSS_Factory::createCategoryDao(); $catDAO->checkDefault(); - $this->view->categories = $catDAO->listSortedCategories(false) ?: []; + $this->view->categories = $catDAO->listSortedCategories(prePopulateFeeds: false); FreshRSS_View::prependTitle(_t('admin.stats.title') . ' ยท '); } @@ -127,7 +127,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); $feed_dao = FreshRSS_Factory::createFeedDao(); $statsDAO = FreshRSS_Factory::createStatsDAO(); - $feeds = $statsDAO->calculateFeedLastDate() ?: []; + $feeds = $statsDAO->calculateFeedLastDate(); $idleFeeds = [ 'last_5_year' => [], 'last_3_year' => [], @@ -223,7 +223,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { $id = null; } - $this->view->categories = $categoryDAO->listCategories(true) ?: []; + $this->view->categories = $categoryDAO->listCategories(prePopulateFeeds: true); $this->view->feed = $id === null ? FreshRSS_Feed::default() : ($feedDAO->searchById($id) ?? FreshRSS_Feed::default()); $this->view->days = $statsDAO->getDays(); $this->view->months = $statsDAO->getMonths(); -- cgit v1.2.3