mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge pull request #903 from hduijn/develop
Added SNS specifics code for removing quotes from description
This commit is contained in:
commit
c50e180a4e
52
app/Import/Specifics/SnsDescription.php
Normal file
52
app/Import/Specifics/SnsDescription.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* snsDescription.php
|
||||
* Author 2017 hugovanduijn@gmail.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Import\Specifics;
|
||||
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class SnsDescription
|
||||
*
|
||||
* @package FireflyIII\Import\Specifics
|
||||
*/
|
||||
class SnsDescription implements SpecificInterface
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription(): string
|
||||
{
|
||||
return 'Trim quotes from SNS descriptions.';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'SNS description';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $row
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function run(array $row): array
|
||||
{
|
||||
$row[17] = ltrim($row[17],"'");
|
||||
$row[17] = rtrim($row[17],"'");
|
||||
return $row;
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ return [
|
||||
'IngDescription' => 'FireflyIII\Import\Specifics\IngDescription',
|
||||
'RabobankDescription' => 'FireflyIII\Import\Specifics\RabobankDescription',
|
||||
'AbnAmroDescription' => 'FireflyIII\Import\Specifics\AbnAmroDescription',
|
||||
'SnsDescription' => 'FireflyIII\Import\Specifics\SnsDescription',
|
||||
'PresidentsChoice' => 'FireflyIII\Import\Specifics\PresidentsChoice',
|
||||
],
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user