mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Various code clean up.
This commit is contained in:
@@ -260,8 +260,8 @@ class CsvProcessor implements FileProcessorInterface
|
||||
private function specifics(array $row): array
|
||||
{
|
||||
$config = $this->job->configuration;
|
||||
//
|
||||
foreach ($config['specifics'] as $name => $enabled) {
|
||||
$names = array_keys($config['specifics']);
|
||||
foreach ($names as $name) {
|
||||
|
||||
if (!in_array($name, $this->validSpecifics)) {
|
||||
throw new FireflyException(sprintf('"%s" is not a valid class name', $name));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user