Simplified some code.

This commit is contained in:
James Cole
2016-04-29 08:56:56 +02:00
parent ea014a6504
commit 14b94a5bd2
13 changed files with 104 additions and 83 deletions

View File

@@ -95,11 +95,10 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
// description and opposing account will be the same.
$this->data['opposing-account-name'] = $matches[4];
$this->data['description'] = $matches[4];
if ($matches[1] == 'GEA') {
$this->data['description'] = 'GEA ' . $matches[4];
} else {
$this->data['description'] = $matches[4];
}
return true;
@@ -154,9 +153,8 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
// Set a new description for the current transaction. If none was given
// set the description to type, name and reference
if ($newDescription) {
$this->data['description'] = $newDescription;
} else {
$this->data['description'] = $newDescription;
if (strlen($newDescription) === 0) {
$this->data['description'] = sprintf('%s - %s (%s)', $type, $name, $reference);
}
@@ -212,9 +210,8 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
// Set a new description for the current transaction. If none was given
// set the description to type, name and reference
if ($newDescription) {
$this->data['description'] = $newDescription;
} else {
$this->data['description'] = $newDescription;
if (strlen($newDescription) === 0) {
$this->data['description'] = sprintf('%s - %s (%s)', $type, $name, $reference);
}
}