]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(QBMapper): Fix findEntities() return type to be list<T> fix/qbmapper/find-entities-return-type 49114/head
authorprovokateurin <kate@provokateurin.de>
Wed, 6 Nov 2024 15:31:39 +0000 (16:31 +0100)
committerprovokateurin <kate@provokateurin.de>
Wed, 6 Nov 2024 15:31:39 +0000 (16:31 +0100)
Signed-off-by: provokateurin <kate@provokateurin.de>
lib/private/TaskProcessing/Db/TaskMapper.php
lib/public/AppFramework/Db/QBMapper.php

index 2bdee4fa13415de3d86e4cf99f4cccdbffb7c324..91fd68820ae560fc742bbe3eea5fccf9316f6406 100644 (file)
@@ -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);
        }
 
        /**
index 243310fe93301793e30a300686140172ca6be91b..4071a4a47a4ce1fe8e8b5227c83a70a091343400 100644 (file)
@@ -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
         */