2016-07-16 01:25:39 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* INGDebetCredit.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Import\Converter;
|
|
|
|
|
2016-07-24 11:47:55 -05:00
|
|
|
use Log;
|
2016-07-16 01:25:39 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class INGDebetCredit
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Import\Converter
|
|
|
|
*/
|
|
|
|
class INGDebetCredit extends BasicConverter implements ConverterInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $value
|
|
|
|
*
|
2016-07-24 11:47:55 -05:00
|
|
|
* @return int
|
2016-07-16 01:25:39 -05:00
|
|
|
*/
|
|
|
|
public function convert($value)
|
|
|
|
{
|
2016-08-12 02:27:09 -05:00
|
|
|
Log::debug('Going to convert ing debet credit', ['value' => $value]);
|
2016-07-24 11:47:55 -05:00
|
|
|
|
|
|
|
if ($value === 'Af') {
|
|
|
|
Log::debug('Return -1');
|
2016-07-29 14:40:58 -05:00
|
|
|
$this->setCertainty(100);
|
2016-08-26 01:21:31 -05:00
|
|
|
|
2016-07-24 11:47:55 -05:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-07-29 14:40:58 -05:00
|
|
|
$this->setCertainty(100);
|
2016-07-24 11:47:55 -05:00
|
|
|
Log::debug('Return 1');
|
2016-08-26 01:21:31 -05:00
|
|
|
|
2016-07-24 11:47:55 -05:00
|
|
|
return 1;
|
2016-07-16 01:25:39 -05:00
|
|
|
|
|
|
|
}
|
2016-08-12 08:10:03 -05:00
|
|
|
}
|