Clean up code for import routine.

This commit is contained in:
James Cole
2018-03-24 10:35:42 +01:00
parent 310ed9f504
commit 55602d632d
23 changed files with 363 additions and 181 deletions

View File

@@ -61,7 +61,6 @@ class FileConfigurator implements ConfiguratorInterface
/** @var ImportJobRepositoryInterface */
private $repository;
// give job default config:
/** @var string */
private $warning = '';
@@ -145,6 +144,7 @@ class FileConfigurator implements ConfiguratorInterface
* Return possible warning to user.
*
* @return string
*
* @throws FireflyException
*/
public function getWarningMessage(): string
@@ -158,6 +158,7 @@ class FileConfigurator implements ConfiguratorInterface
/**
* @return bool
*
* @throws FireflyException
*/
public function isJobConfigured(): bool
@@ -167,7 +168,7 @@ class FileConfigurator implements ConfiguratorInterface
}
$config = $this->getConfig();
$stage = $config['stage'] ?? 'initial';
if ($stage === 'ready') {
if ('ready' === $stage) {
Log::debug('isJobConfigured returns true');
return true;
@@ -252,6 +253,7 @@ class FileConfigurator implements ConfiguratorInterface
* Shorthand method to return the extended status.
*
* @codeCoverageIgnore
*
* @return array
*/
private function getExtendedStatus(): array