2016-07-16 00:58:25 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* RabobankDebetCredit.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;
|
|
|
|
|
|
|
|
use Log;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class RabobankDebetCredit
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Import\Converter
|
|
|
|
*/
|
|
|
|
class RabobankDebetCredit extends BasicConverter implements ConverterInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $value
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function convert($value): int
|
|
|
|
{
|
|
|
|
Log::debug('Going to convert ', ['value' => $value]);
|
|
|
|
|
|
|
|
if ($value === 'D') {
|
2016-07-24 11:47:55 -05:00
|
|
|
Log::debug('Return -1');
|
2016-07-29 14:40:58 -05:00
|
|
|
$this->setCertainty(100);
|
2016-07-24 11:47:55 -05:00
|
|
|
|
2016-07-16 00:58:25 -05:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-07-24 11:47:55 -05:00
|
|
|
Log::debug('Return 1');
|
2016-07-29 14:40:58 -05:00
|
|
|
$this->setCertainty(100);
|
2016-07-24 11:47:55 -05:00
|
|
|
|
2016-07-16 00:58:25 -05:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|