Various code cleanup.

This commit is contained in:
James Cole
2018-02-09 19:11:55 +01:00
parent ac98822a55
commit 95648c37b3
30 changed files with 142 additions and 256 deletions

View File

@@ -85,8 +85,8 @@ class Import extends Command
$monolog->pushHandler($handler);
// actually start job:
$type = 'csv' === $job->file_type ? 'file' : $job->file_type;
$key = sprintf('import.routine.%s', $type);
$type = 'csv' === $job->file_type ? 'file' : $job->file_type;
$key = sprintf('import.routine.%s', $type);
$className = config($key);
if (null === $className || !class_exists($className)) {
throw new FireflyException(sprintf('Cannot find import routine class for job of type "%s".', $type)); // @codeCoverageIgnore