Skip to content

Commit 6da4b0e

Browse files
Merge pull request #989 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2 parents 528044f + e5f0674 commit 6da4b0e

14 files changed

Lines changed: 604 additions & 357 deletions

File tree

.ci/php-cs-fixer/composer.lock

Lines changed: 106 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Http/Controllers/Import/ConfigurationController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public function phpDate(Request $request): JsonResponse
308308
*/
309309
public function postIndex(ConfigurationPostRequest $request): RedirectResponse
310310
{
311+
// TODO this must all move to some kind of validator thing.
311312
Log::debug(sprintf('Now running %s', __METHOD__));
312313
// store config on drive.v
313314
$fromRequest = $request->getAll();

app/Http/Request/ConfigurationPostRequest.php

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -94,60 +94,64 @@ public function getAll(): array
9494
}
9595

9696
return [
97-
'headers' => $this->convertBoolean($this->get('headers')),
98-
'delimiter' => $this->convertToString('delimiter'),
99-
'date' => $this->convertToString('date'),
100-
'default_account' => $this->convertToInteger('default_account'),
101-
'rules' => $this->convertBoolean($this->get('rules')),
102-
'ignore_duplicate_lines' => $this->convertBoolean($this->get('ignore_duplicate_lines')),
103-
'ignore_duplicate_transactions' => $this->convertBoolean($this->get('ignore_duplicate_transactions')),
104-
'skip_form' => $this->convertBoolean($this->get('skip_form')),
105-
'add_import_tag' => $this->convertBoolean($this->get('add_import_tag')),
106-
'pending_transactions' => $this->convertBoolean($this->get('pending_transactions')),
107-
'specifics' => [],
108-
'roles' => [],
109-
'mapping' => [],
110-
'do_mapping' => [],
111-
'flow' => $this->convertToString('flow'),
112-
'content_type' => $this->convertToString('content_type'),
113-
'custom_tag' => $this->convertToString('custom_tag'),
97+
'headers' => $this->convertBoolean($this->get('headers')),
98+
'delimiter' => $this->convertToString('delimiter'),
99+
'date' => $this->convertToString('date'),
100+
'default_account' => $this->convertToInteger('default_account'),
101+
'rules' => $this->convertBoolean($this->get('rules')),
102+
'ignore_duplicate_lines' => $this->convertBoolean($this->get('ignore_duplicate_lines')),
103+
'ignore_duplicate_transactions' => $this->convertBoolean($this->get('ignore_duplicate_transactions')),
104+
'skip_form' => $this->convertBoolean($this->get('skip_form')),
105+
'add_import_tag' => $this->convertBoolean($this->get('add_import_tag')),
106+
'pending_transactions' => $this->convertBoolean($this->get('pending_transactions')),
107+
'specifics' => [],
108+
'roles' => [],
109+
'mapping' => [],
110+
'do_mapping' => [],
111+
'flow' => $this->convertToString('flow'),
112+
'content_type' => $this->convertToString('content_type'),
113+
'custom_tag' => $this->convertToString('custom_tag'),
114114

115115
// duplicate detection:
116-
'duplicate_detection_method' => $this->convertToString('duplicate_detection_method'),
117-
'unique_column_index' => $this->convertToInteger('unique_column_index'),
118-
'unique_column_type' => $this->convertToString('unique_column_type'),
116+
'duplicate_detection_method' => $this->convertToString('duplicate_detection_method'),
117+
'unique_column_index' => $this->convertToInteger('unique_column_index'),
118+
'unique_column_type' => $this->convertToString('unique_column_type'),
119119

120120
// spectre values:
121-
'connection' => $this->convertToString('connection'),
122-
'identifier' => $this->convertToString('identifier'),
123-
'ignore_spectre_categories' => $this->convertBoolean($this->get('ignore_spectre_categories')),
121+
'connection' => $this->convertToString('connection'),
122+
'identifier' => $this->convertToString('identifier'),
123+
'ignore_spectre_categories' => $this->convertBoolean($this->get('ignore_spectre_categories')),
124124

125125
// nordigen:
126-
'nordigen_country' => $this->convertToString('nordigen_country'),
127-
'nordigen_bank' => $this->convertToString('nordigen_bank'),
128-
'nordigen_max_days' => $this->convertToString('nordigen_max_days'),
129-
'nordigen_requisitions' => json_decode($this->convertToString('nordigen_requisitions'), true) ?? [],
126+
'nordigen_country' => $this->convertToString('nordigen_country'),
127+
'nordigen_bank' => $this->convertToString('nordigen_bank'),
128+
'nordigen_max_days' => $this->convertToString('nordigen_max_days'),
129+
'nordigen_requisitions' => json_decode($this->convertToString('nordigen_requisitions'), true) ?? [],
130130

131131
// nordigen + spectre - with decoded account IDs
132-
'do_import' => $decodedDoImport,
133-
'accounts' => $decodedAccounts,
134-
'new_account' => $decodedNewAccount,
135-
'map_all_data' => $this->convertBoolean($this->get('map_all_data')),
136-
'date_range' => $this->convertToString('date_range'),
137-
'date_range_number' => $this->convertToInteger('date_range_number'),
138-
'date_range_unit' => $this->convertToString('date_range_unit'),
139-
'date_not_before' => $this->getCarbonDate('date_not_before'),
140-
'date_not_after' => $this->getCarbonDate('date_not_after'),
132+
'do_import' => $decodedDoImport,
133+
'accounts' => $decodedAccounts,
134+
'new_account' => $decodedNewAccount,
135+
'map_all_data' => $this->convertBoolean($this->get('map_all_data')),
136+
'date_range' => $this->convertToString('date_range'),
137+
'date_range_number' => $this->convertToInteger('date_range_number'),
138+
'date_range_unit' => $this->convertToString('date_range_unit'),
139+
140+
'date_range_not_after_number' => $this->convertToInteger('date_range_not_after_number'),
141+
'date_range_not_after_unit' => $this->convertToString('date_range_not_after_unit'),
142+
143+
'date_not_before' => $this->getCarbonDate('date_not_before'),
144+
'date_not_after' => $this->getCarbonDate('date_not_after'),
141145

142146
// simplefin:
143-
'access_token' => $this->convertToString('access_token'),
147+
'access_token' => $this->convertToString('access_token'),
144148

145149
// utf8 conversion
146-
'conversion' => $this->convertBoolean($this->get('conversion')),
150+
'conversion' => $this->convertBoolean($this->get('conversion')),
147151

148152
// camt
149-
'grouped_transaction_handling' => $this->convertToString('grouped_transaction_handling'),
150-
'use_entire_opposing_address' => $this->convertBoolean($this->get('use_entire_opposing_address')),
153+
'grouped_transaction_handling' => $this->convertToString('grouped_transaction_handling'),
154+
'use_entire_opposing_address' => $this->convertBoolean($this->get('use_entire_opposing_address')),
151155
];
152156
}
153157

0 commit comments

Comments
 (0)