Various code cleanup.

This commit is contained in:
James Cole
2021-04-06 08:51:27 +02:00
parent d32446b171
commit 5ceef2e9c3
47 changed files with 161 additions and 557 deletions

View File

@@ -148,7 +148,7 @@ class AccountCurrencies extends Command
}
Log::debug(sprintf('Users currency pref is %s', $defaultCurrencyCode));
/** @var TransactionCurrency $defaultCurrency */
/** @var TransactionCurrency|null $defaultCurrency */
$defaultCurrency = TransactionCurrency::where('code', $defaultCurrencyCode)->first();
if (null === $defaultCurrency) {

View File

@@ -73,11 +73,8 @@ class AppendBudgetLimitPeriods extends Command
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
if (null !== $configVar) {
return (bool)$configVar->data;
}
return false; // @codeCoverageIgnore
return (bool)$configVar->data;
}
/**

View File

@@ -87,11 +87,7 @@ class BackToJournals extends Command
private function isMigrated(): bool
{
$configVar = app('fireflyconfig')->get(MigrateToGroups::CONFIG_NAME, false);
if (null !== $configVar) {
return (bool)$configVar->data;
}
return false; // @codeCoverageIgnore
}
/**
@@ -100,11 +96,7 @@ class BackToJournals extends Command
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
if (null !== $configVar) {
return (bool)$configVar->data;
}
return false; // @codeCoverageIgnore
}
/**