mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Final set of php8.4 changes.
This commit is contained in:
@@ -118,7 +118,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
// amount:
|
||||
$amount = app('steam')->positive((string) ($transaction['amount'] ?? '0'));
|
||||
$foreignAmount = null;
|
||||
if (null !== $transaction['foreign_amount'] && '' !== $transaction['foreign_amount'] && 0 !== bccomp('0', $transaction['foreign_amount'])) {
|
||||
if (null !== $transaction['foreign_amount'] && '' !== $transaction['foreign_amount'] && 0 !== bccomp('0', (string) $transaction['foreign_amount'])) {
|
||||
$foreignAmount = app('steam')->positive($transaction['foreign_amount']);
|
||||
}
|
||||
$type = $this->stringFromArray($transaction, 'transaction_type_type', TransactionTypeEnum::WITHDRAWAL->value);
|
||||
@@ -132,7 +132,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
return [
|
||||
'user' => (string) $transaction['user_id'],
|
||||
'transaction_journal_id' => (string) $transaction['transaction_journal_id'],
|
||||
'type' => strtolower($type),
|
||||
'type' => strtolower((string) $type),
|
||||
'date' => $transaction['date']->toAtomString(),
|
||||
'order' => $transaction['order'],
|
||||
|
||||
@@ -296,7 +296,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
$type = $journal->transactionType->type;
|
||||
$currency = $source->transactionCurrency;
|
||||
$amount = app('steam')->bcround($this->getAmount($source->amount), $currency->decimal_places ?? 0);
|
||||
$foreignAmount = $this->getForeignAmount(null === $source->foreign_amount ? null : $source->foreign_amount);
|
||||
$foreignAmount = $this->getForeignAmount($source->foreign_amount ?? null);
|
||||
$metaFieldData = $this->groupRepos->getMetaFields($journal->id, $this->metaFields);
|
||||
$metaDates = $this->getDates($this->groupRepos->getMetaDateFields($journal->id, $this->metaDateFields));
|
||||
$foreignCurrency = $this->getForeignCurrency($source->foreignCurrency);
|
||||
@@ -321,7 +321,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
return [
|
||||
'user' => $journal->user_id,
|
||||
'transaction_journal_id' => (string) $journal->id,
|
||||
'type' => strtolower($type),
|
||||
'type' => strtolower((string) $type),
|
||||
'date' => $journal->date->toAtomString(),
|
||||
'order' => $journal->order,
|
||||
|
||||
|
Reference in New Issue
Block a user