mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Some issues fixed for scrutiniser.
This commit is contained in:
		| @@ -11,6 +11,7 @@ declare(strict_types = 1); | ||||
|  | ||||
| namespace FireflyIII\Import\Importer; | ||||
|  | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Import\Converter\ConverterInterface; | ||||
| use FireflyIII\Import\ImportEntry; | ||||
| use FireflyIII\Import\Specifics\SpecificInterface; | ||||
| @@ -120,8 +121,14 @@ class CsvImporter implements ImporterInterface | ||||
|  | ||||
|         foreach ($row as $rowIndex => $value) { | ||||
|             // find the role for this column: | ||||
|             $role           = $config['column-roles'][$rowIndex] ?? '_ignore'; | ||||
|             $doMap          = $config['column-do-mapping'][$rowIndex] ?? false; | ||||
|             $role            = $config['column-roles'][$rowIndex] ?? '_ignore'; | ||||
|             $doMap           = $config['column-do-mapping'][$rowIndex] ?? false; | ||||
|             $validConverters = array_keys('csv.import_roles'); | ||||
|  | ||||
|             // throw error when not a valid converter. | ||||
|             if (!in_array($role, $validConverters)) { | ||||
|                 throw new FireflyException(sprintf('"%s" is not a valid role.', $role)); | ||||
|             } | ||||
|             $converterClass = config('csv.import_roles.' . $role . '.converter'); | ||||
|             $mapping        = $config['column-mapping-config'][$rowIndex] ?? []; | ||||
|             $className      = sprintf('FireflyIII\\Import\\Converter\\%s', $converterClass); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user