mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Refactor code and fix tests.
This commit is contained in:
@@ -28,7 +28,10 @@ use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Log;
|
||||
|
||||
class AuthenticatedConfigHandler implements SpectreJobConfig
|
||||
/**
|
||||
* Class AuthenticatedHandler
|
||||
*/
|
||||
class AuthenticatedHandler implements SpectreConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
private $importJob;
|
@@ -38,10 +38,10 @@ use Illuminate\Support\MessageBag;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ChooseAccount
|
||||
* Class ChooseAccountsHandler
|
||||
*
|
||||
*/
|
||||
class ChooseAccount implements SpectreJobConfig
|
||||
class ChooseAccountsHandler implements SpectreConfigurationInterface
|
||||
{
|
||||
|
||||
/** @var AccountRepositoryInterface */
|
@@ -40,7 +40,7 @@ use Log;
|
||||
* Class ChooseLoginHandler
|
||||
*
|
||||
*/
|
||||
class ChooseLoginHandler implements SpectreJobConfig
|
||||
class ChooseLoginHandler implements SpectreConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
private $importJob;
|
||||
@@ -93,7 +93,7 @@ class ChooseLoginHandler implements SpectreJobConfig
|
||||
$config['token'] = $token->toArray();
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
// move job to correct stage to redirect to Spectre:
|
||||
$this->repository->setStage($this->importJob, 'authenticate');
|
||||
$this->repository->setStage($this->importJob, 'do-authenticate');
|
||||
|
||||
return new MessageBag;
|
||||
|
||||
|
@@ -38,7 +38,7 @@ use Log;
|
||||
* Class AuthenticateConfig
|
||||
*
|
||||
*/
|
||||
class AuthenticateConfig implements SpectreJobConfig
|
||||
class DoAuthenticateHandler implements SpectreConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
private $importJob;
|
@@ -31,7 +31,7 @@ use Illuminate\Support\MessageBag;
|
||||
* Class NewConfig
|
||||
*
|
||||
*/
|
||||
class NewConfig implements SpectreJobConfig
|
||||
class NewSpectreJobHandler implements SpectreConfigurationInterface
|
||||
{
|
||||
|
||||
/**
|
@@ -31,7 +31,7 @@ use Illuminate\Support\MessageBag;
|
||||
* Interface SpectreJobConfig
|
||||
*
|
||||
*/
|
||||
interface SpectreJobConfig
|
||||
interface SpectreConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* Return true when this stage is complete.
|
Reference in New Issue
Block a user