Fix phpstan issue.

This commit is contained in:
James Cole
2024-01-06 07:49:50 +01:00
parent 8ad27e0eda
commit 110228e65e
2 changed files with 8 additions and 2 deletions

View File

@@ -1055,6 +1055,7 @@ class GroupCollector implements GroupCollectorInterface
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->orderBy('transaction_journals.description', 'DESC')
->orderBy('source.amount', 'DESC');
->orderBy('source.amount', 'DESC')
;
}
}

View File

@@ -68,7 +68,7 @@ class TransactionGroupTransformer extends AbstractTransformer
{
$collectForObjects = false;
/** @var array $object */
/** @var array|TransactionGroup $object */
foreach ($objects as $object) {
if (is_array($object)) {
$this->collectForArray($object);
@@ -147,6 +147,11 @@ class TransactionGroupTransformer extends AbstractTransformer
return $return;
}
/**
* @throws FireflyException
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
private function transformJournal(TransactionJournal $journal): array
{
$id = $journal->id;