Reformat various code.

This commit is contained in:
James Cole
2022-03-29 14:58:06 +02:00
parent 1209c4e76a
commit 29bed2547c
140 changed files with 1004 additions and 1010 deletions

View File

@@ -102,7 +102,7 @@ class InterestingMessage
// send message about newly created transaction group.
/** @var TransactionGroup $group */
$group = auth()->user()->transactionGroups()->with(['transactionJournals', 'transactionJournals.transactionType'])->find((int)$transactionGroupId);
$group = auth()->user()->transactionGroups()->with(['transactionJournals', 'transactionJournals.transactionType'])->find((int) $transactionGroupId);
if (null === $group) {
return;
@@ -118,17 +118,17 @@ class InterestingMessage
$title = $count > 1 ? $group->title : $journal->description;
if ('created' === $message) {
session()->flash('success_url', route('transactions.show', [$transactionGroupId]));
session()->flash('success', (string)trans('firefly.stored_journal', ['description' => $title]));
session()->flash('success', (string) trans('firefly.stored_journal', ['description' => $title]));
}
if ('updated' === $message) {
$type = strtolower($journal->transactionType->type);
session()->flash('success_url', route('transactions.show', [$transactionGroupId]));
session()->flash('success', (string)trans(sprintf('firefly.updated_%s', $type), ['description' => $title]));
session()->flash('success', (string) trans(sprintf('firefly.updated_%s', $type), ['description' => $title]));
}
if ('no_change' === $message) {
$type = strtolower($journal->transactionType->type);
session()->flash('warning_url', route('transactions.show', [$transactionGroupId]));
session()->flash('warning', (string)trans(sprintf('firefly.no_changes_%s', $type), ['description' => $title]));
session()->flash('warning', (string) trans(sprintf('firefly.no_changes_%s', $type), ['description' => $title]));
}
}
@@ -163,13 +163,13 @@ class InterestingMessage
return;
}
if ('deleted' === $message) {
session()->flash('success', (string)trans('firefly.account_deleted', ['name' => $account->name]));
session()->flash('success', (string) trans('firefly.account_deleted', ['name' => $account->name]));
}
if ('created' === $message) {
session()->flash('success', (string)trans('firefly.stored_new_account', ['name' => $account->name]));
session()->flash('success', (string) trans('firefly.stored_new_account', ['name' => $account->name]));
}
if ('updated' === $message) {
session()->flash('success', (string)trans('firefly.updated_account', ['name' => $account->name]));
session()->flash('success', (string) trans('firefly.updated_account', ['name' => $account->name]));
}
}
@@ -204,10 +204,10 @@ class InterestingMessage
return;
}
if ('deleted' === $message) {
session()->flash('success', (string)trans('firefly.deleted_bill', ['name' => $bill->name]));
session()->flash('success', (string) trans('firefly.deleted_bill', ['name' => $bill->name]));
}
if ('created' === $message) {
session()->flash('success', (string)trans('firefly.stored_new_bill', ['name' => $bill->name]));
session()->flash('success', (string) trans('firefly.stored_new_bill', ['name' => $bill->name]));
}
}
}