. */ declare(strict_types=1); namespace FireflyIII\Import\Converter; use Log; /** * * Class BankDebitCredit * * @deprecated * @codeCoverageIgnore */ class BankDebitCredit implements ConverterInterface { /** * Convert a value. * * @param $value * * @return int */ public function convert($value): int { Log::debug('Going to convert ', ['value' => $value]); $negative = [ 'D', // Old style Rabobank (NL). Short for "Debit" 'A', // New style Rabobank (NL). Short for "Af" 'DR', // https://old.reddit.com/r/FireflyIII/comments/bn2edf/generic_debitcredit_indicator/ 'Af', // ING (NL). 'Debet', // Triodos (NL) 'S', // "Soll", German term for debit 'Debit', // Community America (US) ]; if (in_array(trim($value), $negative, true)) { return -1; } return 1; } }