mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Code consistency and new tests.
This commit is contained in:
@@ -927,12 +927,15 @@ class BunqRoutine implements RoutineInterface
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job): void
|
||||
public function setImportJob(ImportJob $importJob): void
|
||||
{
|
||||
// TODO: Implement setJob() method.
|
||||
// TODO: Implement setImportJob() method.
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ class FakeRoutine implements RoutineInterface
|
||||
case 'final':
|
||||
/** @var StageFinalHandler $handler */
|
||||
$handler = app(StageFinalHandler::class);
|
||||
$handler->setJob($this->importJob);
|
||||
$handler->setImportJob($this->importJob);
|
||||
$transactions = $handler->getTransactions();
|
||||
$this->repository->setStatus($this->importJob, 'provider_finished');
|
||||
$this->repository->setStage($this->importJob, 'final');
|
||||
@@ -90,14 +90,14 @@ class FakeRoutine implements RoutineInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public function setJob(ImportJob $job): void
|
||||
public function setImportJob(ImportJob $importJob): void
|
||||
{
|
||||
$this->importJob = $job;
|
||||
$this->importJob = $importJob;
|
||||
$this->repository = app(ImportJobRepositoryInterface::class);
|
||||
$this->repository->setUser($job->user);
|
||||
$this->repository->setUser($importJob->user);
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class FileRoutine implements RoutineInterface
|
||||
// get processor, depending on file type
|
||||
// is just CSV for now.
|
||||
$processor = $this->getProcessor();
|
||||
$processor->setJob($this->importJob);
|
||||
$processor->setImportJob($this->importJob);
|
||||
$transactions = $processor->run();
|
||||
|
||||
$this->repository->setStatus($this->importJob, 'provider_finished');
|
||||
@@ -68,13 +68,13 @@ class FileRoutine implements RoutineInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job): void
|
||||
public function setImportJob(ImportJob $importJob): void
|
||||
{
|
||||
$this->importJob = $job;
|
||||
$this->importJob = $importJob;
|
||||
$this->repository = app(ImportJobRepositoryInterface::class);
|
||||
$this->repository->setUser($job->user);
|
||||
}
|
||||
|
@@ -40,9 +40,9 @@ interface RoutineInterface
|
||||
public function run(): void;
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job): void;
|
||||
public function setImportJob(ImportJob $importJob): void;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user