Clean up two big methods.

This commit is contained in:
James Cole
2018-07-19 16:57:38 +02:00
parent b96d67a54e
commit 633b357d7b
2 changed files with 76 additions and 73 deletions

View File

@@ -181,13 +181,20 @@ class ImportTransaction
}
$meta = ['sepa-ct-id', 'sepa-ct-op', 'sepa-db', 'sepa-cc', 'sepa-country', 'sepa-batch-id', 'sepa-ep', 'sepa-ci', 'internal-reference', 'date-interest',
'date-invoice', 'date-book', 'date-payment', 'date-process', 'date-due', 'rabo-debit-credit', 'ing-debit-credit',];
if (isset($meta[$role])) {
'date-invoice', 'date-book', 'date-payment', 'date-process', 'date-due',];
if (\in_array($role, $meta, true)) {
$this->meta[$role] = $columnValue->getValue();
return;
}
$modifiers = ['rabo-debit-credit', 'ing-debit-credit'];
if (\in_array($role, $modifiers, true)) {
$this->modifiers[$role] = $columnValue->getValue();
return;
}
switch ($role) {
default:
// @codeCoverageIgnoreStart