@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ->withOpposingAccount(); |
138 | 138 | $transactions = $collector->getTransactions(); |
139 | 139 | $transactions = $transactions->filter( |
140 | - function (Transaction $transaction) { |
|
140 | + function(Transaction $transaction) { |
|
141 | 141 | // return negative amounts only. |
142 | 142 | if (bccomp($transaction->transaction_amount, '0') === -1) { |
143 | 143 | return $transaction; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | return false; |
147 | 147 | } |
148 | 148 | ); |
149 | - $expenses = $this->groupByOpposing($transactions); |
|
149 | + $expenses = $this->groupByOpposing($transactions); |
|
150 | 150 | |
151 | 151 | // sort the result |
152 | 152 | // Obtain a list of columns |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ->withOpposingAccount(); |
180 | 180 | $transactions = $collector->getTransactions(); |
181 | 181 | $transactions = $transactions->filter( |
182 | - function (Transaction $transaction) { |
|
182 | + function(Transaction $transaction) { |
|
183 | 183 | // return positive amounts only. |
184 | 184 | if (1 === bccomp($transaction->transaction_amount, '0')) { |
185 | 185 | return $transaction; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | return false; |
189 | 189 | } |
190 | 190 | ); |
191 | - $income = $this->groupByOpposing($transactions); |
|
191 | + $income = $this->groupByOpposing($transactions); |
|
192 | 192 | |
193 | 193 | // sort the result |
194 | 194 | // Obtain a list of columns |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $defaultCurrency = app('amount')->getDefaultCurrencyByUser($this->user); |
222 | 222 | /** @var CurrencyRepositoryInterface $currencyRepos */ |
223 | 223 | $currencyRepos = app(CurrencyRepositoryInterface::class); |
224 | - $currencies = [$defaultCurrency->id => $defaultCurrency,]; |
|
224 | + $currencies = [$defaultCurrency->id => $defaultCurrency, ]; |
|
225 | 225 | $expenses = []; |
226 | 226 | $countAccounts = []; // if count remains 0 use original name, not the name with the currency. |
227 | 227 |
@@ -268,13 +268,13 @@ discard block |
||
268 | 268 | if (!Schema::hasTable('transaction_journals')) { |
269 | 269 | return; |
270 | 270 | } |
271 | - $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
|
271 | + $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
|
272 | 272 | ->whereNull('transaction_journals.deleted_at') |
273 | 273 | ->whereNull('transactions.deleted_at') |
274 | 274 | ->groupBy(['transaction_journals.id']) |
275 | 275 | ->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]); |
276 | 276 | /** @noinspection PhpStrictTypeCheckingInspection */ |
277 | - $result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived')) |
|
277 | + $result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived')) |
|
278 | 278 | ->mergeBindings($subQuery->getQuery()) |
279 | 279 | ->where('t_count', '>', 2) |
280 | 280 | ->select(['id', 't_count']); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | /** @var AccountRepositoryInterface $repository */ |
300 | 300 | $repository = app(AccountRepositoryInterface::class); |
301 | 301 | $accounts->each( |
302 | - function (Account $account) use ($repository) { |
|
302 | + function(Account $account) use ($repository) { |
|
303 | 303 | $repository->setUser($account->user); |
304 | 304 | // get users preference, fall back to system pref. |
305 | 305 | $defaultCurrencyCode = app('preferences')->getForUser($account->user, 'currencyPreference', config('firefly.default_currency', 'EUR'))->data; |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | ->get(['transaction_journals.*']); |
368 | 368 | |
369 | 369 | $set->each( |
370 | - function (TransactionJournal $journal) use ($repository, $accountRepos) { |
|
370 | + function(TransactionJournal $journal) use ($repository, $accountRepos) { |
|
371 | 371 | // get the transaction with the asset account in it: |
372 | 372 | /** @var Transaction $transaction */ |
373 | 373 | $transaction = $journal->transactions() |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | } |
387 | 387 | $transactions = $journal->transactions()->get(); |
388 | 388 | $transactions->each( |
389 | - function (Transaction $transaction) use ($currency) { |
|
389 | + function(Transaction $transaction) use ($currency) { |
|
390 | 390 | if (null === $transaction->transaction_currency_id) { |
391 | 391 | $transaction->transaction_currency_id = $currency->id; |
392 | 392 | $transaction->save(); |
@@ -427,12 +427,12 @@ discard block |
||
427 | 427 | ->get(['transaction_journals.*']); |
428 | 428 | |
429 | 429 | $set->each( |
430 | - function (TransactionJournal $transfer) { |
|
430 | + function(TransactionJournal $transfer) { |
|
431 | 431 | // select all "source" transactions: |
432 | 432 | /** @var Collection $transactions */ |
433 | 433 | $transactions = $transfer->transactions()->where('amount', '<', 0)->get(); |
434 | 434 | $transactions->each( |
435 | - function (Transaction $transaction) { |
|
435 | + function(Transaction $transaction) { |
|
436 | 436 | $this->updateTransactionCurrency($transaction); |
437 | 437 | $this->updateJournalCurrency($transaction); |
438 | 438 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | protected function schedule(Schedule $schedule): void |
55 | 55 | { |
56 | 56 | $schedule->call( |
57 | - function () { |
|
57 | + function() { |
|
58 | 58 | Log::error( |
59 | 59 | 'Firefly III no longer users the Laravel scheduler to do cron jobs! Please read the instructions at https://firefly-iii.readthedocs.io/en/latest/' |
60 | 60 | ); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | parent::__construct(); |
55 | 55 | |
56 | 56 | $this->middleware( |
57 | - function ($request, $next) { |
|
57 | + function($request, $next) { |
|
58 | 58 | app('view')->share('title', (string)trans('firefly.categories')); |
59 | 59 | app('view')->share('mainTitleIcon', 'fa-bar-chart'); |
60 | 60 | $this->repository = app(CategoryRepositoryInterface::class); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $subTitle = trans( |
92 | 92 | 'firefly.journals_in_period_for_category', |
93 | 93 | ['name' => $category->name, 'start' => $start->formatLocalized($this->monthAndDayFormat), |
94 | - 'end' => $end->formatLocalized($this->monthAndDayFormat),] |
|
94 | + 'end' => $end->formatLocalized($this->monthAndDayFormat), ] |
|
95 | 95 | ); |
96 | 96 | |
97 | 97 | /** @var TransactionCollectorInterface $collector */ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | parent::__construct(); |
69 | 69 | |
70 | 70 | $this->middleware( |
71 | - function ($request, $next) { |
|
71 | + function($request, $next) { |
|
72 | 72 | app('view')->share('title', (string)trans('firefly.transactions')); |
73 | 73 | app('view')->share('mainTitleIcon', 'fa-repeat'); |
74 | 74 | $this->repository = app(JournalRepositoryInterface::class); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | // get attachments: |
237 | 237 | $attachments = $this->repository->getAttachments($journal); |
238 | 238 | $attachments = $attachments->each( |
239 | - function (Attachment $attachment) { |
|
239 | + function(Attachment $attachment) { |
|
240 | 240 | $attachment->file_exists = $this->attachmentRepository->exists($attachment); |
241 | 241 | |
242 | 242 | return $attachment; |