From 350edf398c55b472e19a3017de9b4d2d3420b9e4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 10 Apr 2024 15:33:43 +0200 Subject: PHP 8.3 #[\Override] (#6273) * PHP 8.3 #[\Override] https://php.watch/versions/8.3/override-attr With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute And modified the call to phpstan-next on the model of https://github.com/FreshRSS/Extensions/pull/228 (more robust than the find method, which gave some strange errors) * Update extension example accordingly --- app/Models/StatsDAOSQLite.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/Models/StatsDAOSQLite.php') diff --git a/app/Models/StatsDAOSQLite.php b/app/Models/StatsDAOSQLite.php index 2aa86f0da..8997f3abe 100644 --- a/app/Models/StatsDAOSQLite.php +++ b/app/Models/StatsDAOSQLite.php @@ -3,6 +3,7 @@ declare(strict_types=1); class FreshRSS_StatsDAOSQLite extends FreshRSS_StatsDAO { + #[\Override] protected function sqlFloor(string $s): string { return "CAST(($s) AS INT)"; } @@ -10,6 +11,7 @@ class FreshRSS_StatsDAOSQLite extends FreshRSS_StatsDAO { /** * @return array */ + #[\Override] protected function calculateEntryRepartitionPerFeedPerPeriod(string $period, ?int $feed = null): array { if ($feed) { $restrict = "WHERE e.id_feed = {$feed}"; -- cgit v1.2.3