Exit code 0

This commit is contained in:
James Cole
2023-11-04 19:06:47 +01:00
parent 0f6f4e1a50
commit e51fef3037
5 changed files with 12 additions and 9 deletions

View File

@@ -237,13 +237,13 @@ class ExportData extends Command
{
$final = new Collection();
$accounts = new Collection();
$accountList = $this->option('accounts');
$accountList = (string)$this->option('accounts');
$types = [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE];
if (null !== $accountList && '' !== (string)$accountList) {
if ('' !== $accountList) {
$accountIds = explode(',', $accountList);
$accounts = $this->accountRepository->getAccountsById($accountIds);
}
if (null === $accountList) {
if ('' === $accountList) {
$accounts = $this->accountRepository->getAccountsByType($types);
}
// filter accounts,

View File

@@ -54,10 +54,10 @@ class UpgradeFireflyInstructions extends Command
public function handle(): int
{
$this->generateInstallationId();
if ('update' === (string)$this->argument('task')) {
if ('update' === $this->argument('task')) {
$this->updateInstructions();
}
if ('install' === (string)$this->argument('task')) {
if ('install' === $this->argument('task')) {
$this->installInstructions();
}

View File

@@ -74,7 +74,7 @@ class Cron extends Command
} catch (InvalidArgumentException $e) {
$this->friendlyError(sprintf('"%s" is not a valid date', $this->option('date')));
}
$force = (bool)$this->option('force');
$force = (bool) $this->option('force');
/*
* Fire exchange rates cron job.