Various code clean up.

This commit is contained in:
James Cole
2017-08-12 10:27:45 +02:00
parent a3a416b5e2
commit 9803932324
99 changed files with 322 additions and 24 deletions

View File

@@ -252,12 +252,11 @@ class ImportStorage
/**
* @param ImportJournal $importJournal
* @param Account $account
* @param TransactionCurrency $localCurrency
*
* @return int|null
*/
private function getForeignCurrencyId(ImportJournal $importJournal, Account $account, TransactionCurrency $localCurrency): ?int
private function getForeignCurrencyId(ImportJournal $importJournal, TransactionCurrency $localCurrency): ?int
{
// get journal currency, if any:
$currency = $importJournal->getCurrency()->getTransactionCurrency();
@@ -394,7 +393,7 @@ class ImportStorage
$asset = $importJournal->asset->getAccount();
$amount = $importJournal->getAmount();
$currency = $this->getCurrency($importJournal, $asset);
$foreignCurrencyId = $this->getForeignCurrencyId($importJournal, $asset, $currency);
$foreignCurrencyId = $this->getForeignCurrencyId($importJournal, $currency);
$date = $importJournal->getDate($this->dateFormat);
$transactionType = $this->getTransactionType($amount);
$opposing = $this->getOpposingAccount($importJournal->opposing, $amount);