mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Various code cleanup.
This commit is contained in:
@@ -89,8 +89,8 @@ class PiggyBankTransformer extends AbstractTransformer
|
||||
|
||||
// left to save:
|
||||
$leftToSave = bcsub($piggyBank->targetamount, $currentAmountStr);
|
||||
$startDate = null === $piggyBank->startdate ? null : $piggyBank->startdate->toAtomString();
|
||||
$targetDate = null === $piggyBank->targetdate ? null : $piggyBank->targetdate->toAtomString();
|
||||
$startDate = $piggyBank->startdate?->toAtomString();
|
||||
$targetDate = $piggyBank->targetdate?->toAtomString();
|
||||
|
||||
// target and percentage:
|
||||
$targetAmount = $piggyBank->targetamount;
|
||||
|
||||
@@ -94,8 +94,8 @@ class RecurrenceTransformer extends AbstractTransformer
|
||||
'title' => $recurrence->title,
|
||||
'description' => $recurrence->description,
|
||||
'first_date' => $recurrence->first_date->toAtomString(),
|
||||
'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->toAtomString(),
|
||||
'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->toAtomString(),
|
||||
'latest_date' => $recurrence->latest_date?->toAtomString(),
|
||||
'repeat_until' => $recurrence->repeat_until?->toAtomString(),
|
||||
'apply_rules' => $recurrence->apply_rules,
|
||||
'active' => $recurrence->active,
|
||||
'nr_of_repetitions' => $reps,
|
||||
|
||||
@@ -42,7 +42,7 @@ class TagTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Tag $tag): array
|
||||
{
|
||||
$date = null === $tag->date ? null : $tag->date->toAtomString();
|
||||
$date = $tag->date?->toAtomString();
|
||||
/** @var Location $location */
|
||||
$location = $tag->locations()->first();
|
||||
$latitude = null;
|
||||
|
||||
@@ -138,7 +138,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
|
||||
return [
|
||||
'user' => (string)$row['user_id'],
|
||||
'transaction_journal_id' => (int)$row['transaction_journal_id'],
|
||||
'transaction_journal_id' => (string)$row['transaction_journal_id'],
|
||||
'type' => strtolower($type),
|
||||
'date' => $row['date']->toAtomString(),
|
||||
'order' => $row['order'],
|
||||
|
||||
Reference in New Issue
Block a user