Code cleanup

This commit is contained in:
James Cole
2024-12-22 08:43:12 +01:00
parent 5751f7e5a3
commit 565bd87959
574 changed files with 4600 additions and 4604 deletions

View File

@@ -66,22 +66,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' => app('steam')->bcround($event->amount, $currency->decimal_places),
'currency_id' => (string)$currency->id,
'currency_id' => (string) $currency->id,
'currency_code' => $currency->code,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => $currency->decimal_places,
'transaction_journal_id' => null !== $journalId ? (string)$journalId : null,
'transaction_group_id' => null !== $groupId ? (string)$groupId : null,
'transaction_journal_id' => null !== $journalId ? (string) $journalId : null,
'transaction_group_id' => null !== $groupId ? (string) $groupId : null,
'links' => [
[
'rel' => 'self',