mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-20 11:48:27 -06:00
Code cleanup
This commit is contained in:
parent
4bbc898639
commit
2b829cb645
@ -40,7 +40,9 @@ class PiggyBankServiceProvider extends ServiceProvider
|
|||||||
/**
|
/**
|
||||||
* Bootstrap the application services.
|
* Bootstrap the application services.
|
||||||
*/
|
*/
|
||||||
public function boot(): void {}
|
public function boot(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the application services.
|
* Register the application services.
|
||||||
|
@ -43,9 +43,9 @@ use JsonException;
|
|||||||
*/
|
*/
|
||||||
class PiggyBankTransformer extends AbstractTransformer
|
class PiggyBankTransformer extends AbstractTransformer
|
||||||
{
|
{
|
||||||
// private AccountRepositoryInterface $accountRepos;
|
// private AccountRepositoryInterface $accountRepos;
|
||||||
// private CurrencyRepositoryInterface $currencyRepos;
|
// private CurrencyRepositoryInterface $currencyRepos;
|
||||||
// private PiggyBankRepositoryInterface $piggyRepos;
|
// private PiggyBankRepositoryInterface $piggyRepos;
|
||||||
private array $accounts;
|
private array $accounts;
|
||||||
private ExchangeRateConverter $converter;
|
private ExchangeRateConverter $converter;
|
||||||
private array $currencies;
|
private array $currencies;
|
||||||
@ -66,9 +66,9 @@ class PiggyBankTransformer extends AbstractTransformer
|
|||||||
$this->groups = [];
|
$this->groups = [];
|
||||||
$this->currencies = [];
|
$this->currencies = [];
|
||||||
$this->repetitions = [];
|
$this->repetitions = [];
|
||||||
// $this->
|
// $this->
|
||||||
// $this->currencyRepos = app(CurrencyRepositoryInterface::class);
|
// $this->currencyRepos = app(CurrencyRepositoryInterface::class);
|
||||||
// $this->piggyRepos = app(PiggyBankRepositoryInterface::class);
|
// $this->piggyRepos = app(PiggyBankRepositoryInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,31 +146,31 @@ class PiggyBankTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
public function transform(PiggyBank $piggyBank): array
|
public function transform(PiggyBank $piggyBank): array
|
||||||
{
|
{
|
||||||
// $account = $piggyBank->account;
|
// $account = $piggyBank->account;
|
||||||
// $this->accountRepos->setUser($account->user);
|
// $this->accountRepos->setUser($account->user);
|
||||||
// $this->currencyRepos->setUser($account->user);
|
// $this->currencyRepos->setUser($account->user);
|
||||||
// $this->piggyRepos->setUser($account->user);
|
// $this->piggyRepos->setUser($account->user);
|
||||||
|
|
||||||
// get currency from account, or use default.
|
// get currency from account, or use default.
|
||||||
// $currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
|
// $currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
|
||||||
|
|
||||||
// note
|
// note
|
||||||
// $notes = $this->piggyRepos->getNoteText($piggyBank);
|
// $notes = $this->piggyRepos->getNoteText($piggyBank);
|
||||||
// $notes = '' === $notes ? null : $notes;
|
// $notes = '' === $notes ? null : $notes;
|
||||||
|
|
||||||
// $objectGroupId = null;
|
// $objectGroupId = null;
|
||||||
// $objectGroupOrder = null;
|
// $objectGroupOrder = null;
|
||||||
// $objectGroupTitle = null;
|
// $objectGroupTitle = null;
|
||||||
// /** @var ObjectGroup $objectGroup */
|
// /** @var ObjectGroup $objectGroup */
|
||||||
// $objectGroup = $piggyBank->objectGroups->first();
|
// $objectGroup = $piggyBank->objectGroups->first();
|
||||||
// if (null !== $objectGroup) {
|
// if (null !== $objectGroup) {
|
||||||
// $objectGroupId = (int)$objectGroup->id;
|
// $objectGroupId = (int)$objectGroup->id;
|
||||||
// $objectGroupOrder = (int)$objectGroup->order;
|
// $objectGroupOrder = (int)$objectGroup->order;
|
||||||
// $objectGroupTitle = $objectGroup->title;
|
// $objectGroupTitle = $objectGroup->title;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// get currently saved amount:
|
// get currently saved amount:
|
||||||
// $currentAmount = app('steam')->bcround($this->piggyRepos->getCurrentAmount($piggyBank), $currency->decimal_places);
|
// $currentAmount = app('steam')->bcround($this->piggyRepos->getCurrentAmount($piggyBank), $currency->decimal_places);
|
||||||
|
|
||||||
$percentage = null;
|
$percentage = null;
|
||||||
$leftToSave = null;
|
$leftToSave = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user