Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:45:59 +01:00
parent 9a807fc215
commit c2b22a2bac
157 changed files with 648 additions and 669 deletions

View File

@@ -46,8 +46,8 @@ class AccountCurrencies extends Command
public const string CONFIG_NAME = '480_account_currencies';
protected $description = 'Give all accounts proper currency info.';
protected $signature = 'firefly-iii:account-currencies {--F|force : Force the execution of this command.}';
protected $description = 'Give all accounts proper currency info.';
protected $signature = 'firefly-iii:account-currencies {--F|force : Force the execution of this command.}';
private AccountRepositoryInterface $accountRepos;
private int $count;
private UserRepositoryInterface $userRepos;
@@ -109,14 +109,14 @@ class AccountCurrencies extends Command
*/
private function updateAccountCurrencies(): void
{
$users = $this->userRepos->all();
$users = $this->userRepos->all();
foreach ($users as $user) {
$this->updateCurrenciesForUser($user);
}
}
/**
* @param User $user
* @param User $user
*
* @throws FireflyException
*/

View File

@@ -51,8 +51,8 @@ class MigrateToGroups extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_migrated_to_groups';
protected $description = 'Migrates a pre-4.7.8 transaction structure to the 4.7.8+ transaction structure.';
protected $signature = 'firefly-iii:migrate-to-groups {--F|force : Force the migration, even if it fired before.}';
protected $description = 'Migrates a pre-4.7.8 transaction structure to the 4.7.8+ transaction structure.';
protected $signature = 'firefly-iii:migrate-to-groups {--F|force : Force the migration, even if it fired before.}';
private JournalCLIRepositoryInterface $cliRepository;
private int $count;
private TransactionGroupFactory $groupFactory;

View File

@@ -169,7 +169,7 @@ class MigrateToRules extends Command
if ('MIGRATED_TO_RULES' === $bill->match) {
return;
}
$languageString = null !== $language->data && !is_array($language->data) ? (string)$language->data : 'en_US';
$languageString = null !== $language->data && !is_array($language->data) ? (string)$language->data : 'en_US';
// get match thing:
$match = implode(' ', explode(',', $bill->match));

View File

@@ -45,8 +45,8 @@ class OtherCurrenciesCorrections extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_other_currencies';
protected $description = 'Update all journal currency information.';
protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
protected $description = 'Update all journal currency information.';
protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
private array $accountCurrencies;
private AccountRepositoryInterface $accountRepos;
private JournalCLIRepositoryInterface $cliRepos;

View File

@@ -42,8 +42,8 @@ class TransactionIdentifier extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_transaction_identifier';
protected $description = 'Fixes transaction identifiers.';
protected $signature = 'firefly-iii:transaction-identifiers {--F|force : Force the execution of this command.}';
protected $description = 'Fixes transaction identifiers.';
protected $signature = 'firefly-iii:transaction-identifiers {--F|force : Force the execution of this command.}';
private JournalCLIRepositoryInterface $cliRepository;
private int $count;

View File

@@ -43,8 +43,8 @@ class TransferCurrenciesCorrections extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_transfer_currencies';
protected $description = 'Updates transfer currency information.';
protected $signature = 'firefly-iii:transfer-currencies {--F|force : Force the execution of this command.}';
protected $description = 'Updates transfer currency information.';
protected $signature = 'firefly-iii:transfer-currencies {--F|force : Force the execution of this command.}';
private array $accountCurrencies;
private AccountRepositoryInterface $accountRepos;
private JournalCLIRepositoryInterface $cliRepos;