@@ -131,7 +131,7 @@ |
||
| 131 | 131 | throw new ImportException('Could not load the users currency preference.'); |
| 132 | 132 | } |
| 133 | 133 | $code = $response->getPreference()->data ?? 'EUR'; |
| 134 | - $currencyRequest = new GetCurrencyRequest($uri,$token); |
|
| 134 | + $currencyRequest = new GetCurrencyRequest($uri, $token); |
|
| 135 | 135 | $currencyRequest->setCode($code); |
| 136 | 136 | try { |
| 137 | 137 | /** @var GetCurrencyResponse $result */ |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | private function haveAccess(): bool |
| 37 | 37 | { |
| 38 | - $uri = (string)config('csv_importer.uri'); |
|
| 39 | - $token = (string)config('csv_importer.access_token'); |
|
| 38 | + $uri = (string)config('csv_importer.uri'); |
|
| 39 | + $token = (string)config('csv_importer.access_token'); |
|
| 40 | 40 | $request = new SystemInformationRequest($uri, $token); |
| 41 | 41 | try { |
| 42 | 42 | $request->get(); |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function __construct(Repository $config) |
| 57 | 57 | { |
| 58 | - $trustedProxies = (string) config('csv_importer.trusted_proxies'); |
|
| 58 | + $trustedProxies = (string)config('csv_importer.trusted_proxies'); |
|
| 59 | 59 | $this->proxies = explode(',', $trustedProxies); |
| 60 | 60 | if ('**' === $trustedProxies) { |
| 61 | 61 | $this->proxies = '**'; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | // get columns from file |
| 105 | 105 | $content = StorageService::getContent(session()->get(Constants::UPLOAD_CSV_FILE)); |
| 106 | - $delimiter = (string) config(sprintf('csv_importer.delimiters.%s', $configuration->getDelimiter())); |
|
| 106 | + $delimiter = (string)config(sprintf('csv_importer.delimiters.%s', $configuration->getDelimiter())); |
|
| 107 | 107 | $data = MapperService::getMapData($content, $delimiter, $configuration->isHeaders(), $configuration->getSpecifics(), $data); |
| 108 | 108 | |
| 109 | 109 | return view('import.map.index', compact('mainTitle', 'subTitle', 'roles', 'data')); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $values = !is_array($values) ? [] : $values; |
| 122 | 122 | $mapping = !is_array($mapping) ? [] : $mapping; |
| 123 | 123 | $data = []; |
| 124 | - $configuration = Configuration::fromArray(session()->get(Constants::CONFIGURATION)); |
|
| 124 | + $configuration = Configuration::fromArray(session()->get(Constants::CONFIGURATION)); |
|
| 125 | 125 | |
| 126 | 126 | |
| 127 | 127 | |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | public function withValidator(Validator $validator): void |
| 84 | 84 | { |
| 85 | 85 | $validator->after( |
| 86 | - function (Validator $validator) { |
|
| 86 | + function(Validator $validator) { |
|
| 87 | 87 | // validate all account info |
| 88 | 88 | $this->validateAmountRole($validator); |
| 89 | 89 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $json = file_get_contents($file); |
| 44 | 44 | try { |
| 45 | 45 | json_decode($json, true, 512, JSON_THROW_ON_ERROR); |
| 46 | - } catch (Exception|JsonException $e) { |
|
| 46 | + } catch (Exception | JsonException $e) { |
|
| 47 | 47 | $message = sprintf('The importer can\'t import: could not decode the JSON in the config file: %s', $e->getMessage()); |
| 48 | 48 | Log::error($message); |
| 49 | 49 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | protected function commands(): void |
| 61 | 61 | { |
| 62 | - $this->load(__DIR__.'/Commands'); |
|
| 62 | + $this->load(__DIR__ . '/Commands'); |
|
| 63 | 63 | |
| 64 | 64 | require base_path('routes/console.php'); |
| 65 | 65 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function cleanString($value): string |
| 40 | 40 | { |
| 41 | - $value = (string) $value; |
|
| 41 | + $value = (string)$value; |
|
| 42 | 42 | $search = [ |
| 43 | 43 | "\u{0001}", // start of heading |
| 44 | 44 | "\u{0002}", // start of text |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $routine->setConfiguration(Configuration::fromArray(session()->get(Constants::CONFIGURATION))); |
| 101 | 101 | $routine->setReader(FileReader::getReaderFromSession()); |
| 102 | 102 | $routine->start(); |
| 103 | - } /** @noinspection PhpRedundantCatchClauseInspection */ catch (ImportException|ErrorException|TypeError $e) { |
|
| 103 | + } /** @noinspection PhpRedundantCatchClauseInspection */ catch (ImportException | ErrorException | TypeError $e) { |
|
| 104 | 104 | // update job to error state. |
| 105 | 105 | ImportJobStatusManager::setJobStatus(ImportJobStatus::JOB_ERRORED); |
| 106 | 106 | $error = sprintf('Internal error: %s in file %s:%d', $e->getMessage(), $e->getFile(), $e->getLine()); |