Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:50:17 +02:00
parent 3ec9753808
commit 815fd5ff6b
135 changed files with 643 additions and 582 deletions

View File

@@ -106,6 +106,7 @@ class AccountCurrencies extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -134,6 +135,8 @@ class AccountCurrencies extends Command
/**
* @param User $user
* @param string $systemCurrencyCode
*
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function updateCurrenciesForUser(User $user, string $systemCurrencyCode): void
{

View File

@@ -69,6 +69,7 @@ class AppendBudgetLimitPeriods extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -83,6 +83,7 @@ class BackToJournals extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isMigrated(): bool
{
@@ -93,6 +94,7 @@ class BackToJournals extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -67,7 +67,6 @@ class BudgetLimitCurrency extends Command
/** @var BudgetLimit $budgetLimit */
foreach ($budgetLimits as $budgetLimit) {
if (null === $budgetLimit->transaction_currency_id) {
/** @var Budget $budget */
$budget = $budgetLimit->budget;
if (null !== $budget) {
$user = $budget->user;
@@ -96,6 +95,7 @@ class BudgetLimitCurrency extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -93,6 +93,7 @@ class CCLiabilities extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -105,6 +105,7 @@ class MigrateAttachments extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -64,7 +64,6 @@ class MigrateJournalNotes extends Command
}
$count = 0;
/** @noinspection PhpUndefinedMethodInspection */
$set = TransactionJournalMeta::whereName('notes')->get();
/** @var TransactionJournalMeta $meta */
foreach ($set as $meta) {
@@ -104,6 +103,7 @@ class MigrateJournalNotes extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -79,6 +79,7 @@ class MigrateRecurrenceMeta extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -92,6 +93,7 @@ class MigrateRecurrenceMeta extends Command
/**
* @return int
* @throws \JsonException
*/
private function migrateMetaData(): int
{
@@ -110,6 +112,7 @@ class MigrateRecurrenceMeta extends Command
* @param RecurrenceMeta $meta
*
* @return int
* @throws \JsonException
*/
private function migrateEntry(RecurrenceMeta $meta): int
{
@@ -125,7 +128,7 @@ class MigrateRecurrenceMeta extends Command
if ('tags' === $meta->name) {
$array = explode(',', $meta->value);
$value = json_encode($array, JSON_THROW_ON_ERROR, 512);
$value = json_encode($array, JSON_THROW_ON_ERROR);
}
RecurrenceTransactionMeta::create(

View File

@@ -74,6 +74,7 @@ class MigrateRecurrenceType extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -72,6 +72,7 @@ class MigrateTagLocations extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -127,6 +127,7 @@ class MigrateToGroups extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isMigrated(): bool
{

View File

@@ -119,6 +119,7 @@ class MigrateToRules extends Command
/**
* @return bool
* @throws FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -112,6 +112,7 @@ class OtherCurrenciesCorrections extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -161,7 +162,6 @@ class OtherCurrenciesCorrections extends Command
}
/** @var Account $account */
$account = $leadTransaction->account;
$currency = $this->getCurrency($account);
if (null === $currency) {

View File

@@ -96,6 +96,7 @@ class RenameAccountMeta extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -120,6 +120,7 @@ class TransactionIdentifier extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{

View File

@@ -57,6 +57,7 @@ class UpgradeLiabilities extends Command
/**
* @return bool
* @throws \FireflyIII\Exceptions\FireflyException
*/
private function isExecuted(): bool
{
@@ -96,7 +97,7 @@ class UpgradeLiabilities extends Command
/**
* @param TransactionJournal $journal
*
* @return Transaction
* @return Transaction|null
*/
private function getSourceTransaction(TransactionJournal $journal): ?Transaction
{
@@ -106,7 +107,7 @@ class UpgradeLiabilities extends Command
/**
* @param TransactionJournal $journal
*
* @return Transaction
* @return Transaction|null
*/
private function getDestinationTransaction(TransactionJournal $journal): ?Transaction
{