From f8f163d054110f7e0ff6650fca146b474335f4bd Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:36:27 +0200 Subject: Chore/processing of depreciations and updating code to php72 minimum (#5504) * processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/Controllers/statsController.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/Controllers/statsController.php') diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index 3ce42dd2c..9890db04b 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -104,9 +104,9 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { $id = Minz_Request::paramInt('id'); $ajax = Minz_Request::paramBoolean('ajax'); if ($ajax) { - $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => (string)$id, 'from' => 'stats', 'ajax' => (string)$ajax)); + $url_redirect = ['c' => 'subscription', 'a' => 'feed', 'params' => ['id' => (string)$id, 'from' => 'stats', 'ajax' => (string)$ajax]]; } else { - $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => (string)$id, 'from' => 'stats')); + $url_redirect = ['c' => 'subscription', 'a' => 'feed', 'params' => ['id' => (string)$id, 'from' => 'stats']]; } Minz_Request::forward($url_redirect, true); } @@ -130,16 +130,16 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { $feed_dao = FreshRSS_Factory::createFeedDao(); $statsDAO = FreshRSS_Factory::createStatsDAO(); $feeds = $statsDAO->calculateFeedLastDate() ?: []; - $idleFeeds = array( - 'last_5_year' => array(), - 'last_3_year' => array(), - 'last_2_year' => array(), - 'last_year' => array(), - 'last_6_month' => array(), - 'last_3_month' => array(), - 'last_month' => array(), - 'last_week' => array(), - ); + $idleFeeds = [ + 'last_5_year' => [], + 'last_3_year' => [], + 'last_2_year' => [], + 'last_year' => [], + 'last_6_month' => [], + 'last_3_month' => [], + 'last_month' => [], + 'last_week' => [], + ]; $now = new \DateTime(); $feedDate = clone $now; $lastWeek = clone $now; -- cgit v1.2.3