Fix methods and clean up code.

This commit is contained in:
James Cole
2024-03-09 19:46:16 +01:00
parent 487b65b669
commit 66b322e844
19 changed files with 153 additions and 139 deletions

View File

@@ -69,7 +69,7 @@ class PiggyBankTransformer extends AbstractTransformer
// $this->piggyRepos = app(PiggyBankRepositoryInterface::class);
}
public function collectMetaData(Collection $objects): void
public function collectMetaData(Collection $objects): Collection
{
// TODO move to repository (does not exist yet)
$piggyBanks = $objects->pluck('id')->toArray();
@@ -135,6 +135,8 @@ class PiggyBankTransformer extends AbstractTransformer
Log::debug(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
$this->default = app('amount')->getDefaultCurrencyByUserGroup(auth()->user()->userGroup);
$this->converter = new ExchangeRateConverter();
return $objects;
}
/**