@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * You should have received a copy of the GNU General Public License |
19 | 19 | * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | */ |
21 | -declare(strict_types=1); |
|
21 | +declare(strict_types = 1); |
|
22 | 22 | |
23 | 23 | namespace FireflyIII\Http\Controllers\Transaction; |
24 | 24 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | parent::__construct(); |
47 | 47 | // some useful repositories: |
48 | 48 | $this->middleware( |
49 | - function ($request, $next) { |
|
49 | + function($request, $next) { |
|
50 | 50 | app('view')->share('title', trans('firefly.transactions')); |
51 | 51 | app('view')->share('mainTitleIcon', 'fa-repeat'); |
52 | 52 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * TransactionJournalFactory.php |
5 | 5 | * Copyright (c) 2018 [email protected] |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * UpgradeDatabase.php |
5 | 5 | * Copyright (c) 2017 [email protected] |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | if (!Schema::hasTable('transaction_journals')) { |
100 | 100 | return; |
101 | 101 | } |
102 | - $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
|
102 | + $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
|
103 | 103 | ->whereNull('transaction_journals.deleted_at') |
104 | 104 | ->whereNull('transactions.deleted_at') |
105 | 105 | ->groupBy(['transaction_journals.id']) |
106 | 106 | ->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]); |
107 | - $result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived')) |
|
107 | + $result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived')) |
|
108 | 108 | ->mergeBindings($subQuery->getQuery()) |
109 | 109 | ->where('t_count', '>', 2) |
110 | 110 | ->select(['id', 't_count']); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ->whereIn('account_types.type', [AccountType::DEFAULT, AccountType::ASSET])->get(['accounts.*']); |
130 | 130 | |
131 | 131 | $accounts->each( |
132 | - function (Account $account) { |
|
132 | + function(Account $account) { |
|
133 | 133 | // get users preference, fall back to system pref. |
134 | 134 | $defaultCurrencyCode = Preferences::getForUser($account->user, 'currencyPreference', config('firefly.default_currency', 'EUR'))->data; |
135 | 135 | $defaultCurrency = TransactionCurrency::where('code', $defaultCurrencyCode)->first(); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | ->get(['transaction_journals.*']); |
191 | 191 | |
192 | 192 | $set->each( |
193 | - function (TransactionJournal $journal) use ($repository) { |
|
193 | + function(TransactionJournal $journal) use ($repository) { |
|
194 | 194 | // get the transaction with the asset account in it: |
195 | 195 | /** @var Transaction $transaction */ |
196 | 196 | $transaction = $journal->transactions() |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $currency = $repository->find((int)$account->getMeta('currency_id')); |
206 | 206 | $transactions = $journal->transactions()->get(); |
207 | 207 | $transactions->each( |
208 | - function (Transaction $transaction) use ($currency) { |
|
208 | + function(Transaction $transaction) use ($currency) { |
|
209 | 209 | if (null === $transaction->transaction_currency_id) { |
210 | 210 | $transaction->transaction_currency_id = $currency->id; |
211 | 211 | $transaction->save(); |
@@ -247,12 +247,12 @@ discard block |
||
247 | 247 | ->get(['transaction_journals.*']); |
248 | 248 | |
249 | 249 | $set->each( |
250 | - function (TransactionJournal $transfer) { |
|
250 | + function(TransactionJournal $transfer) { |
|
251 | 251 | // select all "source" transactions: |
252 | 252 | /** @var Collection $transactions */ |
253 | 253 | $transactions = $transfer->transactions()->where('amount', '<', 0)->get(); |
254 | 254 | $transactions->each( |
255 | - function (Transaction $transaction) { |
|
255 | + function(Transaction $transaction) { |
|
256 | 256 | $this->updateTransactionCurrency($transaction); |
257 | 257 | $this->updateJournalCurrency($transaction); |
258 | 258 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * ExpandedProcessor.php |
5 | 5 | * Copyright (c) 2017 [email protected] |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $ibans = array_merge($this->getIbans($assetIds), $this->getIbans($opposingIds)); |
118 | 118 | $currencies = $this->getAccountCurrencies($ibans); |
119 | 119 | $transactions->each( |
120 | - function (Transaction $transaction) use ($notes, $tags, $ibans, $currencies) { |
|
120 | + function(Transaction $transaction) use ($notes, $tags, $ibans, $currencies) { |
|
121 | 121 | $journalId = (int)$transaction->journal_id; |
122 | 122 | $accountId = (int)$transaction->account_id; |
123 | 123 | $opposingId = (int)$transaction->opposing_account_id; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | public function convertJournals(): bool |
161 | 161 | { |
162 | 162 | $this->journals->each( |
163 | - function (Transaction $transaction) { |
|
163 | + function(Transaction $transaction) { |
|
164 | 164 | $this->exportEntries->push(Entry::fromTransaction($transaction)); |
165 | 165 | } |
166 | 166 | ); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | */ |
336 | 336 | private function getTags(array $array): array |
337 | 337 | { |
338 | - $set = DB::table('tag_transaction_journal') |
|
338 | + $set = DB::table('tag_transaction_journal') |
|
339 | 339 | ->whereIn('tag_transaction_journal.transaction_journal_id', $array) |
340 | 340 | ->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id') |
341 | 341 | ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'tag_transaction_journal.transaction_journal_id') |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * You should have received a copy of the GNU General Public License |
19 | 19 | * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | */ |
21 | -declare(strict_types=1); |
|
21 | +declare(strict_types = 1); |
|
22 | 22 | |
23 | 23 | namespace FireflyIII\Services\Bunq\Request; |
24 | 24 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $toSign .= sprintf("%s: %s\n", $name, $value); |
138 | 138 | } |
139 | 139 | } |
140 | - $toSign .= "\n" . $data; |
|
140 | + $toSign .= "\n" . $data; |
|
141 | 141 | $signature = ''; |
142 | 142 | |
143 | 143 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | */ |
21 | 21 | |
22 | -declare(strict_types=1); |
|
22 | +declare(strict_types = 1); |
|
23 | 23 | |
24 | 24 | namespace FireflyIII\Services\Github\Request; |
25 | 25 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | //fetch the products for each category |
60 | 60 | if (isset($releaseXml->entry)) { |
61 | 61 | foreach ($releaseXml->entry as $entry) { |
62 | - $array = [ |
|
62 | + $array = [ |
|
63 | 63 | 'id' => (string)$entry->id, |
64 | 64 | 'updated' => (string)$entry->updated, |
65 | 65 | 'title' => (string)$entry->title, |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * BillRequest.php |
5 | 5 | * Copyright (c) 2018 [email protected] |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | break; |
88 | 88 | case 'PUT': |
89 | 89 | case 'PATCH': |
90 | - $bill = $this->route()->parameter('bill'); |
|
90 | + $bill = $this->route()->parameter('bill'); |
|
91 | 91 | $rules['name'] .= ',' . $bill->id; |
92 | 92 | $rules['match'] .= ',' . $bill->id; |
93 | 93 | break; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | public function withValidator(Validator $validator): void |
107 | 107 | { |
108 | 108 | $validator->after( |
109 | - function (Validator $validator) { |
|
109 | + function(Validator $validator) { |
|
110 | 110 | $data = $validator->getData(); |
111 | 111 | $min = (float)($data['amount_min'] ?? 0); |
112 | 112 | $max = (float)($data['amount_max'] ?? 0); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * TransactionRequest.php |
5 | 5 | * Copyright (c) 2018 [email protected] |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | ]; |
79 | 79 | foreach ($this->get('transactions') as $index => $transaction) { |
80 | - $array = [ |
|
80 | + $array = [ |
|
81 | 81 | 'description' => $transaction['description'] ?? null, |
82 | 82 | 'amount' => $transaction['amount'], |
83 | 83 | 'currency_id' => isset($transaction['currency_id']) ? (int)$transaction['currency_id'] : null, |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | public function withValidator(Validator $validator): void |
174 | 174 | { |
175 | 175 | $validator->after( |
176 | - function (Validator $validator) { |
|
176 | + function(Validator $validator) { |
|
177 | 177 | $this->atLeastOneTransaction($validator); |
178 | 178 | $this->checkValidDescriptions($validator); |
179 | 179 | $this->equalToJournalDescription($validator); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * You should have received a copy of the GNU General Public License |
19 | 19 | * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | */ |
21 | -declare(strict_types=1); |
|
21 | +declare(strict_types = 1); |
|
22 | 22 | |
23 | 23 | namespace FireflyIII\Http\Controllers\Transaction; |
24 | 24 | |
@@ -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', trans('firefly.transactions')); |
59 | 59 | app('view')->share('mainTitleIcon', 'fa-repeat'); |
60 | 60 | $this->repository = app(JournalRepositoryInterface::class); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | // collect some useful meta data for the mass edit: |
173 | 173 | $filtered->each( |
174 | - function (TransactionJournal $journal) { |
|
174 | + function(TransactionJournal $journal) { |
|
175 | 175 | $transaction = $this->repository->getFirstPosTransaction($journal); |
176 | 176 | $currency = $transaction->transactionCurrency; |
177 | 177 | $journal->amount = (float)$transaction->amount; |