Temporary reshuffeling to fix API

This commit is contained in:
James Cole
2021-03-06 07:20:49 +01:00
parent 0afebb26e0
commit 1c661a86b6
85 changed files with 684 additions and 296 deletions

View File

@@ -36,12 +36,9 @@ use Log;
*/
class AvailableBudgetTransformer extends AbstractTransformer
{
/** @var NoBudgetRepositoryInterface */
private $noBudgetRepository;
/** @var OperationsRepositoryInterface */
private $opsRepository;
/** @var BudgetRepositoryInterface */
private $repository;
private NoBudgetRepositoryInterface $noBudgetRepository;
private OperationsRepositoryInterface $opsRepository;
private BudgetRepositoryInterface $repository;
/**
* CurrencyTransformer constructor.
@@ -53,9 +50,6 @@ class AvailableBudgetTransformer extends AbstractTransformer
$this->repository = app(BudgetRepositoryInterface::class);
$this->opsRepository = app(OperationsRepositoryInterface::class);
$this->noBudgetRepository = app(NoBudgetRepositoryInterface::class);
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
@@ -71,10 +65,10 @@ class AvailableBudgetTransformer extends AbstractTransformer
$currency = $availableBudget->transactionCurrency;
$data = [
'id' => (int)$availableBudget->id,
'id' => (string)$availableBudget->id,
'created_at' => $availableBudget->created_at->toAtomString(),
'updated_at' => $availableBudget->updated_at->toAtomString(),
'currency_id' => (int) $currency->id,
'currency_id' => (string) $currency->id,
'currency_code' => $currency->code,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => (int) $currency->decimal_places,