diff options
| author | 2023-03-22 08:26:39 +0100 | |
|---|---|---|
| committer | 2023-03-22 08:26:39 +0100 | |
| commit | 1a0616562db5c096dc7ca187f0210b3d57bffebf (patch) | |
| tree | 4f721c9f06bb601b5ccbf95307f37ba2de0480d7 /app/Models/EntryDAO.php | |
| parent | 247215ffaa2966919115f283fb67a0096df8dc1c (diff) | |
Remove FreshRSS_Searchable for better types (#5212)
* Remove FreshRSS_Searchable for better types
The interface was not used, and it was preventing more precise types for the different `searchById()` methods, as they each have different input and output types.
* Fix type
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index aab17d01e..0740f1ac4 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -1,6 +1,6 @@ <?php -class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { +class FreshRSS_EntryDAO extends Minz_ModelPdo { public static function isCompressed(): bool { return true; @@ -732,8 +732,7 @@ SQL; return isset($res[0]) ? FreshRSS_Entry::fromArray($res[0]) : null; } - /** @return FreshRSS_Entry|null */ - public function searchById($id) { + public function searchById(string $id): ?FreshRSS_Entry { $sql = 'SELECT id, guid, title, author, ' . (static::isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, is_read, is_favorite, id_feed, tags, attributes ' |
