fix(QBMapper): Fix findEntities() return type to be list<T>

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/49114/head
provokateurin 1 year ago
parent 9276f453ae
commit 2c65d0c0d1
No known key found for this signature in database
  1. 6
      lib/private/TaskProcessing/Db/TaskMapper.php
  2. 4
      lib/public/AppFramework/Db/QBMapper.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);
}
/**

@ -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
*/

Loading…
Cancel
Save