mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
Optimise code.
This commit is contained in:
@@ -75,7 +75,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
|
||||
[$currencyId, $currencyCode, $currencySymbol, $decimalPlaces] = $this->getCurrency($account);
|
||||
[$creditCardType, $monthlyPaymentDate] = $this->getCCInfo($account, $accountRole, $accountType);
|
||||
[$openingBalance, $openingBalanceDate] = $this->getOpeningBalance($account, $accountType, $decimalPlaces);
|
||||
[$openingBalance, $openingBalanceDate] = $this->getOpeningBalance($account, $accountType);
|
||||
[$interest, $interestPeriod] = $this->getInterest($account, $accountType);
|
||||
|
||||
$openingBalance = number_format((float) $openingBalance, $decimalPlaces, '.', '');
|
||||
@@ -235,7 +235,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
*
|
||||
* TODO refactor call to getOpeningBalanceAmount / Date because its extra queries.
|
||||
*/
|
||||
private function getOpeningBalance(Account $account, string $accountType, int $decimalPlaces): array
|
||||
private function getOpeningBalance(Account $account, string $accountType): array
|
||||
{
|
||||
$openingBalance = null;
|
||||
$openingBalanceDate = null;
|
||||
|
||||
Reference in New Issue
Block a user