diff options
| author | 2023-04-17 16:24:35 +0200 | |
|---|---|---|
| committer | 2023-04-17 16:24:35 +0200 | |
| commit | 62496339b6a43fcbb8267fb0f14ac2b165bf5826 (patch) | |
| tree | a7ed5fe51af404af6939814e401c002252589f5c /app/Models/EntryDAO.php | |
| parent | 5185bcef13862ee86298cd38b83da145d03055b5 (diff) | |
More consistent use of iterable type (#5308)
For `yield`
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 8 |
1 files changed, 4 insertions, 4 deletions
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<array<string,string|int>> */ - public function selectAll() { + /** @return iterable<array<string,string|int>> */ + 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<string> $ids * @return iterable<FreshRSS_Entry> */ - public function listByIds(array $ids, string $order = 'DESC') { + public function listByIds(array $ids, string $order = 'DESC'): iterable { if (count($ids) < 1) { return; } |
