diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-11-07 10:35:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-07 10:35:54 +0100 |
commit | c6002ed3e9e3a0a93653200fad38e261541d74b7 (patch) | |
tree | 308b6a613bdf31d1b433b7130ce3069c0334d0f2 /lib | |
parent | 9290b852d9c24f8323c85b8e84c7374df69d67b4 (diff) | |
parent | 2c65d0c0d14d8b227d485063dfd4995b07978ea3 (diff) | |
download | nextcloud-server-c6002ed3e9e3a0a93653200fad38e261541d74b7.tar.gz nextcloud-server-c6002ed3e9e3a0a93653200fad38e261541d74b7.zip |
Merge pull request #49114 from nextcloud/fix/qbmapper/find-entities-return-type
fix(QBMapper): Fix findEntities() return type to be list<T>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/TaskProcessing/Db/TaskMapper.php | 6 | ||||
-rw-r--r-- | 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<Entity> all fetched entities + * @psalm-return list<T> all fetched entities * @throws Exception * @since 14.0.0 */ |