From 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 10 Jan 2025 08:13:09 +0100 Subject: Reduce undeeded use of elvis operator ?: (#7204) --- 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 c169e0e24..af229df54 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -1427,9 +1427,9 @@ SQL; /** * @param array $guids - * @return array|false + * @return array guid => hash */ - public function listHashForFeedGuids(int $id_feed, array $guids): array|false { + public function listHashForFeedGuids(int $id_feed, array $guids): array { $result = []; if (count($guids) < 1) { return $result; @@ -1437,7 +1437,7 @@ SQL; // Split a query with too many variables parameters $guidsChunks = array_chunk($guids, FreshRSS_DatabaseDAO::MAX_VARIABLE_NUMBER); foreach ($guidsChunks as $guidsChunk) { - $result += $this->listHashForFeedGuids($id_feed, $guidsChunk) ?: []; + $result += $this->listHashForFeedGuids($id_feed, $guidsChunk); } return $result; } @@ -1457,7 +1457,7 @@ SQL; $info = $stm === false ? $this->pdo->errorInfo() : $stm->errorInfo(); Minz_Log::error('SQL error ' . __METHOD__ . json_encode($info) . ' while querying feed ' . $id_feed); - return false; + return []; } } -- cgit v1.2.3