Make sure new CSV reader is compatible with specifics #1015

This commit is contained in:
James Cole 2017-12-12 21:05:16 +01:00
parent 44496707fb
commit fc4165b800
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
4 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class AbnAmroDescription implements SpecificInterface
*/
public function run(array $row): array
{
$this->row = $row;
$this->row = array_values($row);
if (!isset($row[7])) {
return $row;

View File

@ -50,6 +50,7 @@ class PresidentsChoice implements SpecificInterface
*/
public function run(array $row): array
{
$row = array_values($row);
// first, if column 2 is empty and 3 is not, do nothing.
// if column 3 is empty and column 2 is not, move amount to column 3, *-1
if (isset($row[3]) && 0 === strlen($row[3])) {

View File

@ -52,6 +52,7 @@ class RabobankDescription implements SpecificInterface
*/
public function run(array $row): array
{
$row = array_values($row);
Log::debug(sprintf('Now in RabobankSpecific::run(). Row has %d columns', count($row)));
$oppositeAccount = isset($row[5]) ? trim($row[5]) : '';
$oppositeName = isset($row[6]) ? trim($row[6]) : '';

View File

@ -51,6 +51,7 @@ class SnsDescription implements SpecificInterface
*/
public function run(array $row): array
{
$row = array_values($row);
$row[17] = ltrim($row[17], "'");
$row[17] = rtrim($row[17], "'");