From: provokateurin Date: Wed, 6 Nov 2024 15:31:39 +0000 (+0100) Subject: fix(QBMapper): Fix findEntities() return type to be list X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2c65d0c0d14d8b227d485063dfd4995b07978ea3;p=nextcloud-server.git fix(QBMapper): Fix findEntities() return type to be list Signed-off-by: provokateurin --- 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 */