From 62496339b6a43fcbb8267fb0f14ac2b165bf5826 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 17 Apr 2023 16:24:35 +0200 Subject: More consistent use of iterable type (#5308) For `yield` --- app/Models/EntryDAO.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Models/EntryDAO.php') diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 1661bfd13..ab71fb0c3 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -696,8 +696,8 @@ SQL; } } - /** @return iterator> */ - public function selectAll() { + /** @return iterable> */ + public function selectAll(): iterable { $sql = 'SELECT id, guid, title, author, ' . (static::isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, `lastSeen`, ' . static::sqlHexEncode('hash') . ' AS hash, is_read, is_favorite, id_feed, tags, attributes ' @@ -1153,7 +1153,7 @@ SQL; */ public function listWhere(string $type = 'a', int $id = 0, int $state = FreshRSS_Entry::STATE_ALL, string $order = 'DESC', int $limit = 1, string $firstId = '', - ?FreshRSS_BooleanSearch $filters = null, int $date_min = 0) { + ?FreshRSS_BooleanSearch $filters = null, int $date_min = 0): iterable { $stm = $this->listWhereRaw($type, $id, $state, $order, $limit, $firstId, $filters, $date_min); if ($stm) { while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { @@ -1166,7 +1166,7 @@ SQL; * @param array $ids * @return iterable */ - public function listByIds(array $ids, string $order = 'DESC') { + public function listByIds(array $ids, string $order = 'DESC'): iterable { if (count($ids) < 1) { return; } -- cgit v1.2.3