@@ -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()); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function redirectTo($request) |
| 43 | 43 | { |
| 44 | - if (! $request->expectsJson()) { |
|
| 44 | + if (!$request->expectsJson()) { |
|
| 45 | 45 | return route('login'); |
| 46 | 46 | } |
| 47 | 47 | return null; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $this->app->bind( |
| 44 | 44 | 'steam', |
| 45 | - static function () { |
|
| 45 | + static function() { |
|
| 46 | 46 | return new Steam; |
| 47 | 47 | } |
| 48 | 48 | ); |
@@ -203,8 +203,8 @@ |
||
| 203 | 203 | { |
| 204 | 204 | $lineValues = array_values($line); |
| 205 | 205 | array_walk( |
| 206 | - $lineValues, static function ($element) { |
|
| 207 | - return trim(str_replace(' ', ' ', (string) $element)); |
|
| 206 | + $lineValues, static function($element) { |
|
| 207 | + return trim(str_replace(' ', ' ', (string)$element)); |
|
| 208 | 208 | } |
| 209 | 209 | ); |
| 210 | 210 | |
@@ -165,11 +165,11 @@ |
||
| 165 | 165 | throw new UnexpectedValueException(sprintf('No place for role "%s"', $value->getRole())); |
| 166 | 166 | } |
| 167 | 167 | if (null === $parsedValue) { |
| 168 | - Log::debug(sprintf('Skip column #%d with role "%s" (in field "%s")', $columnIndex+1, $role, $transactionField)); |
|
| 168 | + Log::debug(sprintf('Skip column #%d with role "%s" (in field "%s")', $columnIndex + 1, $role, $transactionField)); |
|
| 169 | 169 | continue; |
| 170 | 170 | } |
| 171 | 171 | Log::debug( |
| 172 | - sprintf('Stored column #%d with value "%s" and role "%s" in field "%s"', $columnIndex+1, $this->toString($parsedValue), $role, $transactionField) |
|
| 172 | + sprintf('Stored column #%d with value "%s" and role "%s" in field "%s"', $columnIndex + 1, $this->toString($parsedValue), $role, $transactionField) |
|
| 173 | 173 | ); |
| 174 | 174 | |
| 175 | 175 | // if append, append. |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | // loop data, clean up data: |
| 86 | - foreach($data as $index => $columnInfo) { |
|
| 86 | + foreach ($data as $index => $columnInfo) { |
|
| 87 | 87 | $data[$index]['values'] = array_unique($data[$index]['values']); |
| 88 | 88 | asort($data[$index]['values']); |
| 89 | 89 | } |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | // get list of asset accounts: |
| 48 | 48 | $accounts = []; |
| 49 | - $uri = (string) config('csv_importer.uri'); |
|
| 50 | - $token = (string) config('csv_importer.access_token'); |
|
| 49 | + $uri = (string)config('csv_importer.uri'); |
|
| 50 | + $token = (string)config('csv_importer.access_token'); |
|
| 51 | 51 | $request = new GetAccountsRequest($uri, $token); |
| 52 | 52 | $request->setType(GetAccountsRequest::ALL); |
| 53 | 53 | |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | // get list of asset accounts: |
| 79 | 79 | $accounts = []; |
| 80 | 80 | $liabilities = []; |
| 81 | - $uri = (string) config('csv_importer.uri'); |
|
| 82 | - $token = (string) config('csv_importer.access_token'); |
|
| 81 | + $uri = (string)config('csv_importer.uri'); |
|
| 82 | + $token = (string)config('csv_importer.access_token'); |
|
| 83 | 83 | $request = new GetAccountsRequest($uri, $token); |
| 84 | 84 | $request->setType(GetAccountsRequest::ASSET); |
| 85 | 85 | |