From 1ee2a3d72d97df34b5531ae6787f996ac8d62a2b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 26 Mar 2023 21:42:56 +0200 Subject: Fix repartitionAction (#5228) * Fix repartitionAction Fix https://github.com/FreshRSS/FreshRSS/issues/5227 * Better types * PHPStan level 6 --- app/Models/StatsDAOSQLite.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/Models/StatsDAOSQLite.php') diff --git a/app/Models/StatsDAOSQLite.php b/app/Models/StatsDAOSQLite.php index d262b40f8..632fa17e2 100644 --- a/app/Models/StatsDAOSQLite.php +++ b/app/Models/StatsDAOSQLite.php @@ -2,11 +2,14 @@ class FreshRSS_StatsDAOSQLite extends FreshRSS_StatsDAO { - protected function sqlFloor($s) { + protected function sqlFloor(string $s): string { return "CAST(($s) AS INT)"; } - protected function calculateEntryRepartitionPerFeedPerPeriod($period, $feed = null) { + /** + * @return array + */ + protected function calculateEntryRepartitionPerFeedPerPeriod(string $period, ?int $feed = null): array { if ($feed) { $restrict = "WHERE e.id_feed = {$feed}"; } else { -- cgit v1.2.3