aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-11-06 16:31:39 +0100
committerprovokateurin <kate@provokateurin.de>2024-11-06 16:31:39 +0100
commit2c65d0c0d14d8b227d485063dfd4995b07978ea3 (patch)
tree2eff0586aa0e063557cbb62f89cb35677fa85711
parent9276f453ae7046ae42a97415378af813f4e718b0 (diff)
downloadnextcloud-server-2c65d0c0d14d8b227d485063dfd4995b07978ea3.tar.gz
nextcloud-server-2c65d0c0d14d8b227d485063dfd4995b07978ea3.zip
fix(QBMapper): Fix findEntities() return type to be list<T>fix/qbmapper/find-entities-return-type
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/private/TaskProcessing/Db/TaskMapper.php6
-rw-r--r--lib/public/AppFramework/Db/QBMapper.php4
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<Entity> all fetched entities
+ * @psalm-return list<T> all fetched entities
* @throws Exception
* @since 14.0.0
*/