mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Reformat various code.
This commit is contained in:
@@ -72,22 +72,22 @@ class PiggyBankEventTransformer extends AbstractTransformer
|
||||
// get associated journal and transaction, if any:
|
||||
$journalId = $event->transaction_journal_id;
|
||||
$groupId = null;
|
||||
if (0 !== (int)$journalId) {
|
||||
$groupId = (int)$event->transactionJournal->transaction_group_id;
|
||||
$journalId = (int)$journalId;
|
||||
if (0 !== (int) $journalId) {
|
||||
$groupId = (int) $event->transactionJournal->transaction_group_id;
|
||||
$journalId = (int) $journalId;
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => (string)$event->id,
|
||||
'id' => (string) $event->id,
|
||||
'created_at' => $event->created_at->toAtomString(),
|
||||
'updated_at' => $event->updated_at->toAtomString(),
|
||||
'amount' => number_format((float)$event->amount, $currency->decimal_places, '.', ''),
|
||||
'currency_id' => (string)$currency->id,
|
||||
'amount' => number_format((float) $event->amount, $currency->decimal_places, '.', ''),
|
||||
'currency_id' => (string) $currency->id,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => (int)$currency->decimal_places,
|
||||
'transaction_journal_id' => $journalId ? (string)$journalId : null,
|
||||
'transaction_group_id' => $groupId ? (string)$groupId : null,
|
||||
'currency_decimal_places' => (int) $currency->decimal_places,
|
||||
'transaction_journal_id' => $journalId ? (string) $journalId : null,
|
||||
'transaction_group_id' => $groupId ? (string) $groupId : null,
|
||||
'links' => [
|
||||
[
|
||||
'rel' => 'self',
|
||||
|
Reference in New Issue
Block a user