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

@@ -71,8 +71,8 @@ class BillTransformer extends AbstractTransformer
/** @var ObjectGroup $objectGroup */
$objectGroup = $bill->objectGroups->first();
if (null !== $objectGroup) {
$objectGroupId = (int)$objectGroup->id;
$objectGroupOrder = (int)$objectGroup->order;
$objectGroupId = (int) $objectGroup->id;
$objectGroupOrder = (int) $objectGroup->order;
$objectGroupTitle = $objectGroup->title;
}
@@ -106,25 +106,25 @@ class BillTransformer extends AbstractTransformer
unset($temp, $temp2);
return [
'id' => (int)$bill->id,
'id' => (int) $bill->id,
'created_at' => $bill->created_at->toAtomString(),
'updated_at' => $bill->updated_at->toAtomString(),
'currency_id' => (string)$bill->transaction_currency_id,
'currency_id' => (string) $bill->transaction_currency_id,
'currency_code' => $currency->code,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => (int)$currency->decimal_places,
'currency_decimal_places' => (int) $currency->decimal_places,
'name' => $bill->name,
'amount_min' => number_format((float)$bill->amount_min, $currency->decimal_places, '.', ''),
'amount_max' => number_format((float)$bill->amount_max, $currency->decimal_places, '.', ''),
'amount_min' => number_format((float) $bill->amount_min, $currency->decimal_places, '.', ''),
'amount_max' => number_format((float) $bill->amount_max, $currency->decimal_places, '.', ''),
'date' => $bill->date->toAtomString(),
'end_date' => $bill->end_date?->toAtomString(),
'extension_date' => $bill->extension_date?->toAtomString(),
'repeat_freq' => $bill->repeat_freq,
'skip' => (int)$bill->skip,
'skip' => (int) $bill->skip,
'active' => $bill->active,
'order' => (int)$bill->order,
'order' => (int) $bill->order,
'notes' => $notes,
'object_group_id' => $objectGroupId ? (string)$objectGroupId : null,
'object_group_id' => $objectGroupId ? (string) $objectGroupId : null,
'object_group_order' => $objectGroupOrder,
'object_group_title' => $objectGroupTitle,
@@ -202,8 +202,8 @@ class BillTransformer extends AbstractTransformer
$result = [];
foreach ($set as $entry) {
$result[] = [
'transaction_group_id' => (int)$entry->transaction_group_id,
'transaction_journal_id' => (int)$entry->id,
'transaction_group_id' => (int) $entry->transaction_group_id,
'transaction_journal_id' => (int) $entry->id,
'date' => $entry->date->format('Y-m-d'),
];
}
@@ -267,7 +267,7 @@ class BillTransformer extends AbstractTransformer
$nextExpectedMatch->addDay();
$currentStart = clone $nextExpectedMatch;
$loop++;
if($loop > 4) {
if ($loop > 4) {
break;
}
}