Passed
Push — master ( 187aa4...e6d8af )
by James
03:10 queued 10s
created
app/Http/Controllers/Import/RunController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
app/Services/Import/Routine/CSVFileProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -203,8 +203,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Services/Import/Routine/ColumnValueConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,11 +165,11 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
app/Services/CSV/Mapper/MapperService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Services/CSV/Mapper/GetAccounts.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Services/CSV/Roles/RoleService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function getColumns(string $content, Configuration $configuration): array
51 51
     {
52
-        $reader  = Reader::createFromString($content);
52
+        $reader = Reader::createFromString($content);
53 53
 
54 54
         // configure reader:
55 55
         $delimiter = $configuration->getDelimiter();
56
-        switch($delimiter) {
56
+        switch ($delimiter) {
57 57
             default:
58 58
             case 'comma':
59 59
                 $reader->setDelimiter(',');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public static function getExampleData(string $content, Configuration $configuration): array
122 122
     {
123
-        $reader   = Reader::createFromString($content);
123
+        $reader = Reader::createFromString($content);
124 124
 
125 125
         // configure reader:
126 126
         $delimiter = $configuration->getDelimiter();
Please login to merge, or discard this patch.
app/Http/Controllers/TokenController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     public function doValidate(): JsonResponse
46 46
     {
47 47
         $response = ['result' => 'OK', 'message' => null];
48
-        $uri   = (string)config('csv_importer.uri');
49
-        $token   = (string)config('csv_importer.access_token');
48
+        $uri = (string)config('csv_importer.uri');
49
+        $token = (string)config('csv_importer.access_token');
50 50
         $request  = new SystemInformationRequest($uri, $token);
51 51
         try {
52 52
             $result = $request->get();
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
         // 0 = OK (same version)
58 58
         // 1 = NOK (too low a version)
59 59
 
60
-        $minimum = (string) config('csv_importer.minimum_version');
60
+        $minimum = (string)config('csv_importer.minimum_version');
61 61
         $compare = version_compare($minimum, $result->version);
62 62
         if (1 === $compare) {
63 63
             $errorMessage = sprintf(
64 64
                 'Your Firefly III version %s is below the minimum required version %s',
65 65
                 $result->version, $minimum
66 66
             );
67
-            $response     = ['result' => 'NOK', 'message' => $errorMessage];
67
+            $response = ['result' => 'NOK', 'message' => $errorMessage];
68 68
         }
69 69
 
70 70
         return response()->json($response);
Please login to merge, or discard this patch.