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

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-11-06 16:31:39 +01:00
parent 9276f453ae
commit 2c65d0c0d1
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View 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);
}
/**

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