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/Models/StatsDAO.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/Models/StatsDAO.php') diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index 53219843e..122ca14a8 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -2,7 +2,7 @@ class FreshRSS_StatsDAO extends Minz_ModelPdo { - const ENTRY_COUNT_PERIOD = 30; + public const ENTRY_COUNT_PERIOD = 30; protected function sqlFloor(string $s): string { return "FLOOR($s)"; @@ -14,10 +14,10 @@ class FreshRSS_StatsDAO extends Minz_ModelPdo { * @return array{'main_stream':array{'total':int,'count_unreads':int,'count_reads':int,'count_favorites':int}|false,'all_feeds':array{'total':int,'count_unreads':int,'count_reads':int,'count_favorites':int}|false} */ public function calculateEntryRepartition(): array { - return array( + return [ 'main_stream' => $this->calculateEntryRepartitionPerFeed(null, true), 'all_feeds' => $this->calculateEntryRepartitionPerFeed(null, false), - ); + ]; } /** @@ -313,7 +313,7 @@ SQL; * @return array */ public function getDays(): array { - return $this->convertToTranslatedJson(array( + return $this->convertToTranslatedJson([ 'sun', 'mon', 'tue', @@ -321,7 +321,7 @@ SQL; 'thu', 'fri', 'sat', - )); + ]); } /** @@ -329,7 +329,7 @@ SQL; * @return array */ public function getMonths(): array { - return $this->convertToTranslatedJson(array( + return $this->convertToTranslatedJson([ 'jan', 'feb', 'mar', @@ -342,7 +342,7 @@ SQL; 'oct', 'nov', 'dec', - )); + ]); } /** @@ -350,7 +350,7 @@ SQL; * @param array $data * @return array */ - private function convertToTranslatedJson(array $data = array()): array { + private function convertToTranslatedJson(array $data = []): array { $translated = array_map(static function (string $a) { return _t('gen.date.' . $a); }, $data); -- cgit v1.2.3