mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some code cleanup and copyright cleanup. [skip ci]
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
* AbnAmroDescription.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.
|
||||
* 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);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* IngDescription.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
* Copyright (C) 2016 https://github.com/tomwerf
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
* 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);
|
||||
@@ -16,10 +18,10 @@ namespace FireflyIII\Import\Specifics;
|
||||
*
|
||||
* Parses the description from CSV files for Ing bank accounts.
|
||||
*
|
||||
* With Mutation 'InternetBankieren', 'Overschrijving', 'Verzamelbetaling' and 'Incasso' the
|
||||
* Name of Opposing account the Opposing IBAN number are in the Description
|
||||
* This class will remove them
|
||||
* Add Name in description by 'Betaalautomaat' so those are easily recognizable
|
||||
* With Mutation 'InternetBankieren', 'Overschrijving', 'Verzamelbetaling' and
|
||||
* 'Incasso' the Name of Opposing account the Opposing IBAN number are in the
|
||||
* Description. This class will remove them, and add Name in description by
|
||||
* 'Betaalautomaat' so those are easily recognizable
|
||||
*
|
||||
* @package FireflyIII\Import\Specifics
|
||||
*/
|
||||
@@ -54,7 +56,7 @@ class IngDescription implements SpecificInterface
|
||||
$this->row = $row;
|
||||
if (count($this->row) >= 8) { // check if the array is correct
|
||||
switch ($this->row[4]) { // Get value for the mutation type
|
||||
case 'GT': // InternetBanieren
|
||||
case 'GT': // InternetBankieren
|
||||
case 'OV': // Overschrijving
|
||||
case 'VZ': // Verzamelbetaling
|
||||
case 'IC': // Incasso
|
||||
@@ -70,6 +72,19 @@ class IngDescription implements SpecificInterface
|
||||
return $this->row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Opposing name from cell 1 in the description for Betaalautomaten
|
||||
* Otherwise the description is only: 'Pasvolgnr:<nr> <date> Transactie:<NR> Term:<nr>'
|
||||
*
|
||||
* @return bool true
|
||||
*/
|
||||
protected function addNameIngDescription()
|
||||
{
|
||||
$this->row[8] = $this->row[1] . " " . $this->row[8];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove IBAN number out of the description
|
||||
* Default description of Description is: Naam: <OPPOS NAME> Omschrijving: <DESCRIPTION> IBAN: <OPPOS IBAN NR>
|
||||
@@ -79,11 +94,11 @@ class IngDescription implements SpecificInterface
|
||||
protected function removeIBANIngDescription()
|
||||
{
|
||||
// Try replace the iban number with nothing. The IBAN nr is found in the third row
|
||||
$this->row[8] = preg_replace('/\sIBAN:\s'.$this->row[3].'/', '', $this->row[8]);
|
||||
$this->row[8] = preg_replace('/\sIBAN:\s' . $this->row[3] . '/', '', $this->row[8]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove name from the description (Remove everything before the description incl the word 'Omschrijving' )
|
||||
*
|
||||
@@ -93,19 +108,7 @@ class IngDescription implements SpecificInterface
|
||||
{
|
||||
// Try remove everything bevore the 'Omschrijving'
|
||||
$this->row[8] = preg_replace('/.+Omschrijving: /', '', $this->row[8]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the Opposing name from cell 1 in the description for Betaalautomaten
|
||||
* Otherwise the description is only: 'Pasvolgnr:<nr> <date> Transactie:<NR> Term:<nr>'
|
||||
*
|
||||
* @return bool true
|
||||
*/
|
||||
protected function addNameIngDescription()
|
||||
{
|
||||
$this->row[8] = $this->row[1]. " " . $this->row[8];
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -3,8 +3,10 @@
|
||||
* PresidentsChoice.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.
|
||||
* 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);
|
||||
|
@@ -3,8 +3,10 @@
|
||||
* RabobankDescription.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.
|
||||
* 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);
|
||||
|
@@ -3,8 +3,10 @@
|
||||
* SpecificInterface.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.
|
||||
* 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);
|
||||
|
Reference in New Issue
Block a user