mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Various code cleanup.
This commit is contained in:
@@ -77,7 +77,6 @@ class ExportData extends Command
|
||||
{--force : Force overwriting of previous exports if found.}';
|
||||
private AccountRepositoryInterface $accountRepository;
|
||||
private JournalRepositoryInterface $journalRepository;
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
@@ -85,6 +84,7 @@ class ExportData extends Command
|
||||
* @return int
|
||||
* @throws CannotInsertRecord
|
||||
* @throws FireflyException
|
||||
* @throws \League\Csv\Exception
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@@ -96,9 +96,9 @@ class ExportData extends Command
|
||||
}
|
||||
// set up repositories.
|
||||
$this->stupidLaravel();
|
||||
$this->user = $this->getUser();
|
||||
$this->journalRepository->setUser($this->user);
|
||||
$this->accountRepository->setUser($this->user);
|
||||
$user = $this->getUser();
|
||||
$this->journalRepository->setUser($user);
|
||||
$this->accountRepository->setUser($user);
|
||||
// get the options.
|
||||
try {
|
||||
$options = $this->parseOptions();
|
||||
@@ -110,7 +110,7 @@ class ExportData extends Command
|
||||
// make export object and configure it.
|
||||
/** @var ExportDataGenerator $exporter */
|
||||
$exporter = app(ExportDataGenerator::class);
|
||||
$exporter->setUser($this->user);
|
||||
$exporter->setUser($user);
|
||||
|
||||
$exporter->setStart($options['start']);
|
||||
$exporter->setEnd($options['end']);
|
||||
|
@@ -74,7 +74,7 @@ class RemoteUserProvider implements UserProvider
|
||||
public function retrieveByToken($identifier, $token)
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('Did not implement %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('A) Did not implement %s', __METHOD__));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,7 +83,7 @@ class RemoteUserProvider implements UserProvider
|
||||
public function updateRememberToken(Authenticatable $user, $token)
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('Did not implement %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('B) Did not implement %s', __METHOD__));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,6 +92,6 @@ class RemoteUserProvider implements UserProvider
|
||||
public function validateCredentials(Authenticatable $user, array $credentials)
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('Did not implement %s', __METHOD__));
|
||||
throw new FireflyException(sprintf('C) Did not implement %s', __METHOD__));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user