mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Improve code quality.
This commit is contained in:
@@ -37,11 +37,11 @@ use Log;
|
||||
*/
|
||||
class BunqJobConfiguration implements JobConfigurationInterface
|
||||
{
|
||||
/** @var BunqJobConfigurationInterface */
|
||||
/** @var BunqJobConfigurationInterface Bunq job interface */
|
||||
private $handler;
|
||||
/** @var ImportJob */
|
||||
/** @var ImportJob The import job */
|
||||
private $importJob;
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface Import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@@ -88,6 +88,8 @@ class BunqJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Set import job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @throws FireflyException
|
||||
@@ -101,6 +103,8 @@ class BunqJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get correct handler.
|
||||
*
|
||||
* @return BunqJobConfigurationInterface
|
||||
* @throws FireflyException
|
||||
*/
|
||||
|
||||
@@ -32,10 +32,10 @@ use Illuminate\Support\MessageBag;
|
||||
*/
|
||||
class FakeJobConfiguration implements JobConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
/** @var ImportJob The import job */
|
||||
private $importJob;
|
||||
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface Import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@@ -69,6 +69,8 @@ class FakeJobConfiguration implements JobConfigurationInterface
|
||||
* @param array $data
|
||||
*
|
||||
* @return MessageBag
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function configureJob(array $data): MessageBag
|
||||
{
|
||||
@@ -125,6 +127,8 @@ class FakeJobConfiguration implements JobConfigurationInterface
|
||||
* Returns the view of the next step in the job configuration.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function getNextView(): string
|
||||
{
|
||||
@@ -151,6 +155,8 @@ class FakeJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Set import job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*/
|
||||
public function setImportJob(ImportJob $importJob): void
|
||||
|
||||
@@ -40,9 +40,9 @@ use Illuminate\Support\MessageBag;
|
||||
*/
|
||||
class FileJobConfiguration implements JobConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
/** @var ImportJob The import job */
|
||||
private $importJob;
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface Import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@@ -91,6 +91,8 @@ class FileJobConfiguration implements JobConfigurationInterface
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function getNextView(): string
|
||||
{
|
||||
@@ -116,6 +118,8 @@ class FileJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Set import job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*/
|
||||
public function setImportJob(ImportJob $importJob): void
|
||||
@@ -130,6 +134,8 @@ class FileJobConfiguration implements JobConfigurationInterface
|
||||
*
|
||||
* @return FileConfigurationInterface
|
||||
* @throws FireflyException
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
private function getConfigurationObject(): FileConfigurationInterface
|
||||
{
|
||||
|
||||
@@ -62,6 +62,8 @@ interface JobConfigurationInterface
|
||||
public function getNextView(): string;
|
||||
|
||||
/**
|
||||
* Set import job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*/
|
||||
public function setImportJob(ImportJob $importJob): void;
|
||||
|
||||
@@ -26,14 +26,10 @@ namespace FireflyIII\Import\JobConfiguration;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\AuthenticatedConfigHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\AuthenticatedHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\AuthenticateHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\ChooseAccount;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\ChooseAccountsHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\ChooseLoginHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\DoAuthenticateHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\NewConfig;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\NewSpectreJobHandler;
|
||||
use FireflyIII\Support\Import\JobConfiguration\Spectre\SpectreJobConfigurationInterface;
|
||||
use Illuminate\Support\MessageBag;
|
||||
@@ -44,11 +40,11 @@ use Log;
|
||||
*/
|
||||
class SpectreJobConfiguration implements JobConfigurationInterface
|
||||
{
|
||||
/** @var SpectreJobConfigurationInterface */
|
||||
/** @var SpectreJobConfigurationInterface The job handler. */
|
||||
private $handler;
|
||||
/** @var ImportJob */
|
||||
/** @var ImportJob The import job */
|
||||
private $importJob;
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface Import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@@ -95,6 +91,8 @@ class SpectreJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the import job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @throws FireflyException
|
||||
@@ -108,8 +106,12 @@ class SpectreJobConfiguration implements JobConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get correct handler.
|
||||
*
|
||||
* @return SpectreJobConfigurationInterface
|
||||
* @throws FireflyException
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
private function getHandler(): SpectreJobConfigurationInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user