Clean up various code.

This commit is contained in:
James Cole
2018-07-22 12:52:07 +02:00
parent d193a6aec4
commit d4ba014a8a
14 changed files with 171 additions and 95 deletions

View File

@@ -55,7 +55,7 @@ class FakeRoutine implements RoutineInterface
public function run(): void
{
Log::debug(sprintf('Now in run() for fake routine with status: %s', $this->importJob->status));
if ($this->importJob->status !== 'ready_to_run') {
if ('ready_to_run' !== $this->importJob->status) {
throw new FireflyException(sprintf('Fake job should have status "ready_to_run", not "%s"', $this->importJob->status)); // @codeCoverageIgnore
}
@@ -95,7 +95,6 @@ class FakeRoutine implements RoutineInterface
/**
* @param ImportJob $importJob
*
* @return
*/
public function setImportJob(ImportJob $importJob): void
{

View File

@@ -66,7 +66,7 @@ class SpectreRoutine implements RoutineInterface
$handler->run();
// if count logins is zero, go to authenticate stage
if ($handler->getCountLogins() === 0) {
if (0 === $handler->getCountLogins()) {
$this->repository->setStage($this->importJob, 'do-authenticate');
$this->repository->setStatus($this->importJob, 'ready_to_run');