diff options
| author | 2023-04-17 08:30:21 +0200 | |
|---|---|---|
| committer | 2023-04-17 08:30:21 +0200 | |
| commit | f3760f138dcbaf7a2190336a0378cf1b2190c9f5 (patch) | |
| tree | 6fac8fbf9efd7aa74a8e3970ab70ccf85287b2cd /app/Models/FeedDAO.php | |
| parent | 41fa4e746df8c2e2399ed753b4994ca85cb21358 (diff) | |
Complete PHPStan Level 6 (#5305)
* Complete PHPStan Level 6
Fix https://github.com/FreshRSS/FreshRSS/issues/4112
And initiate PHPStan Level 7
* PHPStan Level 6 for tests
* Use phpstan/phpstan-phpunit
* Update to PHPStan version 1.10
* Fix mixed bug
* Fix mixed return bug
* Fix paginator bug
* Fix FreshRSS_UserConfiguration
* A couple more Minz_Configuration bug fixes
* A few trivial PHPStan Level 7 fixes
* A few more simple PHPStan Level 7
* More files passing PHPStan Level 7
Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251
* A few more PHPStan Level 7 preparations
* A few last details
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 9138f3d59..837fef7f1 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -268,7 +268,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { * @param bool|null $muted to include only muted feeds * @return int|false */ - public function deleteFeedByCategory(int $id, $muted = null) { + public function deleteFeedByCategory(int $id, ?bool $muted = null) { $sql = 'DELETE FROM `_feed` WHERE category=?'; if ($muted) { $sql .= ' AND ttl < 0'; @@ -338,7 +338,7 @@ SQL; } /** @return array<string,string> */ - public function listFeedsNewestItemUsec(?int $id_feed = null) { + public function listFeedsNewestItemUsec(?int $id_feed = null): array { $sql = 'SELECT id_feed, MAX(id) as newest_item_us FROM `_entry` '; if ($id_feed === null) { $sql .= 'GROUP BY id_feed'; @@ -358,7 +358,7 @@ SQL; * Use $defaultCacheDuration == -1 to return all feeds, without filtering them by TTL. * @return array<FreshRSS_Feed> */ - public function listFeedsOrderUpdate(int $defaultCacheDuration = 3600, int $limit = 0) { + public function listFeedsOrderUpdate(int $defaultCacheDuration = 3600, int $limit = 0): array { $this->updateTTL(); $sql = 'SELECT id, url, kind, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes ' . 'FROM `_feed` ' @@ -398,7 +398,7 @@ SQL; * @param bool|null $muted to include only muted feeds * @return array<FreshRSS_Feed> */ - public function listByCategory(int $cat, $muted = null): array { + public function listByCategory(int $cat, ?bool $muted = null): array { $sql = 'SELECT * FROM `_feed` WHERE category=?'; if ($muted) { $sql .= ' AND ttl < 0'; |
