mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some issues fixed for scrutiniser.
This commit is contained in:
parent
7232c1d7bb
commit
15089f0d7e
@ -32,12 +32,15 @@ class CsvImporter implements ImporterInterface
|
||||
/** @var ImportJob */
|
||||
public $job;
|
||||
|
||||
public $validSpecifics = [];
|
||||
|
||||
/**
|
||||
* CsvImporter constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->collection = new Collection;
|
||||
$this->collection = new Collection;
|
||||
$this->validSpecifics = array_keys(config('csv.import_specifics'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,6 +115,11 @@ class CsvImporter implements ImporterInterface
|
||||
|
||||
// and this is the point where the specifix go to work.
|
||||
foreach ($config['specifics'] as $name => $enabled) {
|
||||
|
||||
if (!in_array($name, $this->validSpecifics)) {
|
||||
throw new FireflyException(sprintf('"%s" is not a valid class name', $name));
|
||||
}
|
||||
|
||||
/** @var SpecificInterface $specific */
|
||||
$specific = app('FireflyIII\Import\Specifics\\' . $name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user