aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/statsController.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-07-07 22:36:27 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-07 22:36:27 +0200
commitf8f163d054110f7e0ff6650fca146b474335f4bd (patch)
treedbd831e600bc76ca2830cd417bd52b712ff97309 /app/Controllers/statsController.php
parent7f9594b8c7d7799f2e5f89328bd5981410db8cf0 (diff)
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 <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Controllers/statsController.php')
-rw-r--r--app/Controllers/statsController.php24
1 files changed, 12 insertions, 12 deletions
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;