@@ -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 | |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | $routine->setConfiguration(Configuration::fromArray(session()->get(Constants::CONFIGURATION))); |
| 98 | 98 | $routine->setReader(FileReader::getReaderFromSession()); |
| 99 | 99 | $routine->start(); |
| 100 | - } catch (ImportException|ErrorException|TypeError $e) { |
|
| 100 | + } catch (ImportException | ErrorException | TypeError $e) { |
|
| 101 | 101 | // update job to error state. |
| 102 | 102 | ImportJobStatusManager::setJobStatus(ImportJobStatus::JOB_ERRORED); |
| 103 | 103 | $error = sprintf('Internal error: %s in file %s:%d', $e->getMessage(), $e->getFile(), $e->getLine()); |
@@ -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 | |
@@ -215,10 +215,10 @@ discard block |
||
| 215 | 215 | $transaction = $this->setDestination($transaction, $destination); |
| 216 | 216 | $transaction['type'] = $this->determineType($source['type'], $destination['type']); |
| 217 | 217 | |
| 218 | - $amount = (string) $transaction['amount']; |
|
| 218 | + $amount = (string)$transaction['amount']; |
|
| 219 | 219 | $amount = '' === $amount ? '0' : $amount; |
| 220 | 220 | |
| 221 | - if('0'===$amount) { |
|
| 221 | + if ('0' === $amount) { |
|
| 222 | 222 | Log::error('Amount is ZERO. This will give trouble further down the line.'); |
| 223 | 223 | } |
| 224 | 224 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | return 'withdrawal'; |
| 296 | 296 | } |
| 297 | 297 | // if destination is asset and source is NULL, its a deposit |
| 298 | - if(null === $sourceType && 'asset' === $destinationType){ |
|
| 298 | + if (null === $sourceType && 'asset' === $destinationType) { |
|
| 299 | 299 | Log::debug('Return deposit, dest is asset'); |
| 300 | 300 | return 'deposit'; |
| 301 | 301 | } |