Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:00:29 +02:00
parent d1a09ff33b
commit d04efb8325
81 changed files with 662 additions and 662 deletions

View File

@@ -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',