Various code cleanup.

This commit is contained in:
James Cole
2017-02-17 06:42:36 +01:00
parent 1d979778e8
commit 5d0cdc4ffa
31 changed files with 168 additions and 169 deletions

View File

@@ -162,7 +162,7 @@ class ImportStorage
/** @var TagRepositoryInterface $repository */
$repository = app(TagRepositoryInterface::class);
$repository->setUser($this->user);
$data = [
$data = [
'tag' => trans('firefly.import_with_key', ['key' => $this->job->key]),
'date' => new Carbon,
'description' => null,
@@ -171,7 +171,7 @@ class ImportStorage
'zoomLevel' => null,
'tagMode' => 'nothing',
];
$tag = $repository->store($data);
$tag = $repository->store($data);
return $tag;
}

View File

@@ -182,8 +182,8 @@ class CsvSetup implements SetupInterface
{
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class);
$importId = $data['csv_import_account'] ?? 0;
$account = $repository->find(intval($importId));
$importId = $data['csv_import_account'] ?? 0;
$account = $repository->find(intval($importId));
$hasHeaders = isset($data['has_headers']) && intval($data['has_headers']) === 1 ? true : false;
$config = $this->job->configuration;