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:
@@ -40,7 +40,7 @@ use Log;
|
||||
/**
|
||||
* Class ConfigureMappingHandler
|
||||
*/
|
||||
class ConfigureMappingHandler implements ConfigurationInterface
|
||||
class ConfigureMappingHandler implements FileConfigurationInterface
|
||||
{
|
||||
/** @var AttachmentHelperInterface */
|
||||
private $attachments;
|
||||
|
@@ -39,7 +39,7 @@ use Log;
|
||||
/**
|
||||
* Class ConfigureRolesHandler
|
||||
*/
|
||||
class ConfigureRolesHandler implements ConfigurationInterface
|
||||
class ConfigureRolesHandler implements FileConfigurationInterface
|
||||
{
|
||||
/** @var AttachmentHelperInterface */
|
||||
private $attachments;
|
||||
|
@@ -33,7 +33,7 @@ use Log;
|
||||
/**
|
||||
* Class ConfigureUploadHandler
|
||||
*/
|
||||
class ConfigureUploadHandler implements ConfigurationInterface
|
||||
class ConfigureUploadHandler implements FileConfigurationInterface
|
||||
{
|
||||
/** @var ImportJob */
|
||||
private $importJob;
|
||||
|
@@ -26,9 +26,9 @@ use FireflyIII\Models\ImportJob;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
/**
|
||||
* Class ConfigurationInterface.
|
||||
* Class FileConfigurationInterface.
|
||||
*/
|
||||
interface ConfigurationInterface
|
||||
interface FileConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* Store data associated with current stage.
|
@@ -37,7 +37,7 @@ use Log;
|
||||
/**
|
||||
* Class NewFileJobHandler
|
||||
*/
|
||||
class NewFileJobHandler implements ConfigurationInterface
|
||||
class NewFileJobHandler implements FileConfigurationInterface
|
||||
{
|
||||
/** @var AttachmentHelperInterface */
|
||||
private $attachments;
|
||||
|
@@ -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