Code cleanup

This commit is contained in:
James Cole
2018-04-02 14:50:17 +02:00
parent 379b104778
commit fa7ab45a40
100 changed files with 440 additions and 517 deletions

View File

@@ -102,7 +102,7 @@ class Initial implements ConfigurationInterface
Log::debug('Now in storeConfiguration for file Upload.');
$config = $this->getConfig();
$type = $data['import_file_type'] ?? 'csv'; // assume it's a CSV file.
$config['file-type'] = in_array($type, config('import.options.file.import_formats')) ? $type : 'csv';
$config['file-type'] = \in_array($type, config('import.options.file.import_formats'), true) ? $type : 'csv';
// update config:
$this->repository->setConfiguration($this->job, $config);
@@ -118,7 +118,7 @@ class Initial implements ConfigurationInterface
}
if (false === $uploaded) {
$this->warning = 'No valid upload.';
$this->warning = (string)trans('firefly.upload_error');
return true;
}