@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | protected function mapApiRoutes(): void |
| 75 | 75 | { |
| 76 | 76 | Route::prefix('api') |
| 77 | - ->middleware('api') |
|
| 78 | - ->namespace($this->namespace) |
|
| 79 | - ->group(base_path('routes/api.php')); |
|
| 77 | + ->middleware('api') |
|
| 78 | + ->namespace($this->namespace) |
|
| 79 | + ->group(base_path('routes/api.php')); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | protected function mapWebRoutes(): void |
| 90 | 90 | { |
| 91 | 91 | Route::middleware('web') |
| 92 | - ->namespace($this->namespace) |
|
| 93 | - ->group(base_path('routes/web.php')); |
|
| 92 | + ->namespace($this->namespace) |
|
| 93 | + ->group(base_path('routes/web.php')); |
|
| 94 | 94 | } |
| 95 | 95 | } |
@@ -310,7 +310,7 @@ |
||
| 310 | 310 | */ |
| 311 | 311 | private function cleanString(string $string): string |
| 312 | 312 | { |
| 313 | - $search = [ |
|
| 313 | + $search = [ |
|
| 314 | 314 | "\u{0001}", // start of heading |
| 315 | 315 | "\u{0002}", // start of text |
| 316 | 316 | "\u{0003}", // end of text |
@@ -44,13 +44,13 @@ |
||
| 44 | 44 | $response = response($result); |
| 45 | 45 | $name = sprintf('import_config_%s.json', date('Y-m-d')); |
| 46 | 46 | $response->header('Content-disposition', 'attachment; filename=' . $name) |
| 47 | - ->header('Content-Type', 'application/json') |
|
| 48 | - ->header('Content-Description', 'File Transfer') |
|
| 49 | - ->header('Connection', 'Keep-Alive') |
|
| 50 | - ->header('Expires', '0') |
|
| 51 | - ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') |
|
| 52 | - ->header('Pragma', 'public') |
|
| 53 | - ->header('Content-Length', strlen($result)); |
|
| 47 | + ->header('Content-Type', 'application/json') |
|
| 48 | + ->header('Content-Description', 'File Transfer') |
|
| 49 | + ->header('Connection', 'Keep-Alive') |
|
| 50 | + ->header('Expires', '0') |
|
| 51 | + ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') |
|
| 52 | + ->header('Pragma', 'public') |
|
| 53 | + ->header('Content-Length', strlen($result)); |
|
| 54 | 54 | |
| 55 | 55 | return $response; |
| 56 | 56 | } |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $values = !is_array($values) ? [] : $values; |
| 114 | 114 | $mapping = !is_array($mapping) ? [] : $mapping; |
| 115 | 115 | $data = []; |
| 116 | - $configuration = Configuration::fromArray(session()->get(Constants::CONFIGURATION)); |
|
| 116 | + $configuration = Configuration::fromArray(session()->get(Constants::CONFIGURATION)); |
|
| 117 | 117 | |
| 118 | 118 | |
| 119 | 119 | |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | // job ID may be in session: |
| 65 | 65 | $identifier = session()->get(Constants::JOB_IDENTIFIER); |
| 66 | - if(null !== $identifier) { |
|
| 66 | + if (null !== $identifier) { |
|
| 67 | 67 | // create a new import job: |
| 68 | - $routine = new ImportRoutineManager($identifier); |
|
| 68 | + $routine = new ImportRoutineManager($identifier); |
|
| 69 | 69 | } |
| 70 | - if(null === $identifier) { |
|
| 70 | + if (null === $identifier) { |
|
| 71 | 71 | // create a new import job: |
| 72 | 72 | $routine = new ImportRoutineManager(); |
| 73 | 73 | $identifier = $routine->getIdentifier(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | session()->put(Constants::JOB_IDENTIFIER, $identifier); |
| 80 | 80 | Log::debug(sprintf('Stored "%s" under "%s"', $identifier, Constants::JOB_IDENTIFIER)); |
| 81 | 81 | |
| 82 | - return view('import.run.index', compact('mainTitle', 'subTitle','identifier')); |
|
| 82 | + return view('import.run.index', compact('mainTitle', 'subTitle', 'identifier')); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -91,10 +91,10 @@ |
||
| 91 | 91 | { |
| 92 | 92 | return Validator::make( |
| 93 | 93 | $data, [ |
| 94 | - 'name' => ['required', 'string', 'max:255'], |
|
| 95 | - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
|
| 96 | - 'password' => ['required', 'string', 'min:8', 'confirmed'], |
|
| 97 | - ] |
|
| 94 | + 'name' => ['required', 'string', 'max:255'], |
|
| 95 | + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
|
| 96 | + 'password' => ['required', 'string', 'min:8', 'confirmed'], |
|
| 97 | + ] |
|
| 98 | 98 | ); |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -198,7 +198,7 @@ |
||
| 198 | 198 | { |
| 199 | 199 | $lineValues = array_values($line); |
| 200 | 200 | array_walk( |
| 201 | - $lineValues, static function ($element) { |
|
| 201 | + $lineValues, static function($element) { |
|
| 202 | 202 | $element = trim(str_replace(' ', ' ', (string)$element)); |
| 203 | 203 | |
| 204 | 204 | return $element; |
@@ -161,11 +161,11 @@ |
||
| 161 | 161 | throw new RuntimeException(sprintf('No place for role "%s"', $value->getRole())); |
| 162 | 162 | } |
| 163 | 163 | if (null === $parsedValue) { |
| 164 | - Log::debug(sprintf('Skip column #%d with role "%s" (in field "%s")', $columnIndex+1, $role, $transactionField)); |
|
| 164 | + Log::debug(sprintf('Skip column #%d with role "%s" (in field "%s")', $columnIndex + 1, $role, $transactionField)); |
|
| 165 | 165 | continue; |
| 166 | 166 | } |
| 167 | 167 | Log::debug( |
| 168 | - sprintf('Stored column #%d with value "%s" and role "%s" in field "%s"', $columnIndex+1, $this->toString($parsedValue), $role, $transactionField) |
|
| 168 | + sprintf('Stored column #%d with value "%s" and role "%s" in field "%s"', $columnIndex + 1, $this->toString($parsedValue), $role, $transactionField) |
|
| 169 | 169 | ); |
| 170 | 170 | |
| 171 | 171 | // if append, append. |
@@ -321,7 +321,7 @@ |
||
| 321 | 321 | return 'withdrawal'; |
| 322 | 322 | } |
| 323 | 323 | // if destination is asset and source is NULL, its a deposit |
| 324 | - if(null === $sourceType && 'asset' === $destinationType){ |
|
| 324 | + if (null === $sourceType && 'asset' === $destinationType) { |
|
| 325 | 325 | Log::debug('Return deposit, dest is asset'); |
| 326 | 326 | return 'deposit'; |
| 327 | 327 | } |