From 2c65d0c0d14d8b227d485063dfd4995b07978ea3 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 6 Nov 2024 16:31:39 +0100 Subject: [PATCH] fix(QBMapper): Fix findEntities() return type to be list Signed-off-by: provokateurin --- lib/private/TaskProcessing/Db/TaskMapper.php | 6 +++--- lib/public/AppFramework/Db/QBMapper.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/private/TaskProcessing/Db/TaskMapper.php b/lib/private/TaskProcessing/Db/TaskMapper.php index 2bdee4fa134..91fd68820ae 100644 --- a/lib/private/TaskProcessing/Db/TaskMapper.php +++ b/lib/private/TaskProcessing/Db/TaskMapper.php @@ -114,7 +114,7 @@ class TaskMapper extends QBMapper { if ($customId !== null) { $qb->andWhere($qb->expr()->eq('custom_id', $qb->createPositionalParameter($customId))); } - return array_values($this->findEntities($qb)); + return $this->findEntities($qb); } /** @@ -133,7 +133,7 @@ class TaskMapper extends QBMapper { if ($customId !== null) { $qb->andWhere($qb->expr()->eq('custom_id', $qb->createPositionalParameter($customId))); } - return array_values($this->findEntities($qb)); + return $this->findEntities($qb); } /** @@ -178,7 +178,7 @@ class TaskMapper extends QBMapper { $qb->andWhere($qb->expr()->isNotNull('ended_at')); $qb->andWhere($qb->expr()->lt('ended_at', $qb->createPositionalParameter($endedBefore, IQueryBuilder::PARAM_INT))); } - return array_values($this->findEntities($qb)); + return $this->findEntities($qb); } /** diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 243310fe933..4071a4a47a4 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -320,8 +320,8 @@ abstract class QBMapper { * Runs a sql query and returns an array of entities * * @param IQueryBuilder $query - * @return Entity[] all fetched entities - * @psalm-return T[] all fetched entities + * @return list all fetched entities + * @psalm-return list all fetched entities * @throws Exception * @since 14.0.0 */ -- 2.39.5