2016-07-16 08:25:39 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* INGDebetCredit.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-05 06:52:15 +02:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-07-16 08:25:39 +02:00
|
|
|
*/
|
|
|
|
|
2017-04-09 07:44:22 +02:00
|
|
|
declare(strict_types=1);
|
2016-07-16 08:25:39 +02:00
|
|
|
|
|
|
|
namespace FireflyIII\Import\Converter;
|
|
|
|
|
2016-07-24 18:47:55 +02:00
|
|
|
use Log;
|
2016-07-16 08:25:39 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class INGDebetCredit
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Import\Converter
|
|
|
|
*/
|
2017-06-24 06:57:24 +02:00
|
|
|
class INGDebetCredit implements ConverterInterface
|
2016-07-16 08:25:39 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $value
|
|
|
|
*
|
2016-07-24 18:47:55 +02:00
|
|
|
* @return int
|
2016-07-16 08:25:39 +02:00
|
|
|
*/
|
|
|
|
public function convert($value)
|
|
|
|
{
|
2016-08-12 09:27:09 +02:00
|
|
|
Log::debug('Going to convert ing debet credit', ['value' => $value]);
|
2016-07-24 18:47:55 +02:00
|
|
|
|
|
|
|
if ($value === 'Af') {
|
|
|
|
Log::debug('Return -1');
|
2016-08-26 08:21:31 +02:00
|
|
|
|
2016-07-24 18:47:55 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
Log::debug('Return 1');
|
2016-08-26 08:21:31 +02:00
|
|
|
|
2016-07-24 18:47:55 +02:00
|
|
|
return 1;
|
2016-07-16 08:25:39 +02:00
|
|
|
|
|
|
|
}
|
2016-08-12 15:10:03 +02:00
|
|
|
}
|