From 1a0616562db5c096dc7ca187f0210b3d57bffebf Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 Mar 2023 08:26:39 +0100 Subject: 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 --- app/Models/FeedDAO.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/Models/FeedDAO.php') diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 1aae5fee5..1047a218b 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -1,6 +1,6 @@ pdo->inTransaction()) { @@ -284,10 +284,7 @@ SQL; } } - /** - * @return FreshRSS_Feed|null - */ - public function searchById($id) { + public function searchById(int $id): ?FreshRSS_Feed { $sql = 'SELECT * FROM `_feed` WHERE id=:id'; $stm = $this->pdo->prepare($sql); $stm->bindParam(':id', $id, PDO::PARAM_INT); -- cgit v1.2.3