Reformat various code.

This commit is contained in:
James Cole
2022-03-29 14:56:27 +02:00
parent 9cdaf7076a
commit 1209c4e76a
145 changed files with 472 additions and 472 deletions

View File

@@ -84,7 +84,7 @@ class DeleteOrphanedTransactions extends Command
);
/** @var stdClass $entry */
foreach ($set as $entry) {
$transaction = Transaction::find((int)$entry->transaction_id);
$transaction = Transaction::find((int) $entry->transaction_id);
$transaction->delete();
$this->info(
sprintf(
@@ -106,7 +106,7 @@ class DeleteOrphanedTransactions extends Command
private function deleteFromOrphanedAccounts(): void
{
$set
= Transaction
= Transaction
::leftJoin('accounts', 'transactions.account_id', '=', 'accounts.id')
->whereNotNull('accounts.deleted_at')
->get(['transactions.*']);
@@ -114,7 +114,7 @@ class DeleteOrphanedTransactions extends Command
/** @var Transaction $transaction */
foreach ($set as $transaction) {
// delete journals
$journal = TransactionJournal::find((int)$transaction->transaction_journal_id);
$journal = TransactionJournal::find((int) $transaction->transaction_journal_id);
if ($journal) {
try {
$journal->delete();
@@ -124,7 +124,7 @@ class DeleteOrphanedTransactions extends Command
}
}
Transaction::where('transaction_journal_id', (int)$transaction->transaction_journal_id)->delete();
Transaction::where('transaction_journal_id', (int) $transaction->transaction_journal_id)->delete();
$this->line(
sprintf(
'Deleted transaction journal #%d because account #%d was already deleted.',