Lots of refactoring and new tests.

This commit is contained in:
James Cole
2018-05-12 10:46:18 +02:00
parent 4d6bc55723
commit 63f84ae7b1
20 changed files with 1603 additions and 551 deletions

View File

@@ -215,14 +215,12 @@ class ImportTransaction
case 'date-due':
$this->meta[$columnValue->getRole()] = $columnValue->getValue();
break;
case 'foreign-currency-id':
$this->foreignCurrencyId = $this->getMappedValue($columnValue);
break;
case 'foreign-currency-code':
$this->foreignCurrencyCode = $columnValue->getValue();
break;
case 'date-transaction':
$this->date = $columnValue->getValue();
break;
@@ -232,7 +230,6 @@ class ImportTransaction
case 'note':
$this->note = trim($this->note . ' ' . $columnValue->getValue());
break;
case 'opposing-id':
$this->opposingId = $this->getMappedValue($columnValue);
break;
@@ -385,6 +382,17 @@ class ImportTransaction
];
}
/**
* @codeCoverageIgnore
* @return array
*/
public function getForeignCurrencyData(): array
{
return [
'code' => $this->foreignCurrencyCode,
];
}
/**
* @codeCoverageIgnore
* @return array