summaryrefslogtreecommitdiff
path: root/app/Models/StatsDAOSQLite.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-26 21:42:56 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-26 21:42:56 +0200
commit1ee2a3d72d97df34b5531ae6787f996ac8d62a2b (patch)
treed018dba8b53d76a9b8c7ab1b2b743edfd9ba2401 /app/Models/StatsDAOSQLite.php
parent59c1405c7d4d014ff693ef6f44400ea06318dc69 (diff)
Fix repartitionAction (#5228)
* Fix repartitionAction Fix https://github.com/FreshRSS/FreshRSS/issues/5227 * Better types * PHPStan level 6
Diffstat (limited to 'app/Models/StatsDAOSQLite.php')
-rw-r--r--app/Models/StatsDAOSQLite.php7
1 files changed, 5 insertions, 2 deletions
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<int,int>
+ */
+ protected function calculateEntryRepartitionPerFeedPerPeriod(string $period, ?int $feed = null): array {
if ($feed) {
$restrict = "WHERE e.id_feed = {$feed}";
} else {