mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
🤖 Auto commit for release 'develop' on 2025-05-04
This commit is contained in:
@@ -115,7 +115,7 @@ class CorrectsCurrencies extends Command
|
||||
$found = array_values(
|
||||
array_filter(
|
||||
$found,
|
||||
static fn(int $currencyId) => 0 !== $currencyId
|
||||
static fn (int $currencyId) => 0 !== $currencyId
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -128,7 +128,7 @@ class CorrectsNativeAmounts extends Command
|
||||
$repository->setUserGroup($userGroup);
|
||||
$set = $repository->getPiggyBanks();
|
||||
$set = $set->filter(
|
||||
static fn(PiggyBank $piggyBank) => $currency->id !== $piggyBank->transaction_currency_id
|
||||
static fn (PiggyBank $piggyBank) => $currency->id !== $piggyBank->transaction_currency_id
|
||||
);
|
||||
foreach ($set as $piggyBank) {
|
||||
$piggyBank->encrypted = false;
|
||||
|
@@ -115,7 +115,7 @@ class CorrectsTransactionTypes extends Command
|
||||
private function getSourceAccount(TransactionJournal $journal): Account
|
||||
{
|
||||
$collection = $journal->transactions->filter(
|
||||
static fn(Transaction $transaction) => $transaction->amount < 0
|
||||
static fn (Transaction $transaction) => $transaction->amount < 0
|
||||
);
|
||||
if (0 === $collection->count()) {
|
||||
throw new FireflyException(sprintf('300001: Journal #%d has no source transaction.', $journal->id));
|
||||
@@ -142,7 +142,7 @@ class CorrectsTransactionTypes extends Command
|
||||
private function getDestinationAccount(TransactionJournal $journal): Account
|
||||
{
|
||||
$collection = $journal->transactions->filter(
|
||||
static fn(Transaction $transaction) => $transaction->amount > 0
|
||||
static fn (Transaction $transaction) => $transaction->amount > 0
|
||||
);
|
||||
if (0 === $collection->count()) {
|
||||
throw new FireflyException(sprintf('300004: Journal #%d has no destination transaction.', $journal->id));
|
||||
|
@@ -179,7 +179,7 @@ class UpgradesToGroups extends Command
|
||||
private function getDestinationTransactions(TransactionJournal $journal): Collection
|
||||
{
|
||||
return $journal->transactions->filter(
|
||||
static fn(Transaction $transaction) => $transaction->amount > 0
|
||||
static fn (Transaction $transaction) => $transaction->amount > 0
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -38,20 +38,20 @@ class UpgradesTransferCurrencies extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
|
||||
public const string CONFIG_NAME = '480_transfer_currencies';
|
||||
protected $description = 'Updates transfer currency information.';
|
||||
protected $signature = 'upgrade:480-transfer-currencies {--F|force : Force the execution of this command.}';
|
||||
public const string CONFIG_NAME = '480_transfer_currencies';
|
||||
protected $description = 'Updates transfer currency information.';
|
||||
protected $signature = 'upgrade:480-transfer-currencies {--F|force : Force the execution of this command.}';
|
||||
private array $accountCurrencies;
|
||||
private AccountRepositoryInterface $accountRepos;
|
||||
private JournalCLIRepositoryInterface $cliRepos;
|
||||
private int $count;
|
||||
|
||||
private ?Account $destinationAccount = null;
|
||||
private ?TransactionCurrency $destinationCurrency = null;
|
||||
private ?Account $destinationAccount = null;
|
||||
private ?TransactionCurrency $destinationCurrency = null;
|
||||
private ?Transaction $destinationTransaction = null;
|
||||
private ?Account $sourceAccount = null;
|
||||
private ?TransactionCurrency $sourceCurrency = null;
|
||||
private ?Transaction $sourceTransaction = null;
|
||||
private ?Account $sourceAccount = null;
|
||||
private ?TransactionCurrency $sourceCurrency = null;
|
||||
private ?Transaction $sourceTransaction = null;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
|
Reference in New Issue
Block a user