Passed
Push — master ( b4967f...44f7bf )
by James
08:56 queued 10s
created
app/Services/CSV/Mapper/MapperService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,17 +71,17 @@
 block discarded – undo
71 71
             $row = SpecificService::runSpecifics($row, $specifics);
72 72
             // loop each column, put in $data
73 73
             foreach ($row as $columnIndex => $column) {
74
-                if(!isset($data[$columnIndex])) {
74
+                if (!isset($data[$columnIndex])) {
75 75
                     // don't need to handle this. Continue.
76 76
                     continue;
77 77
                 }
78
-                if('' !== $column) {
78
+                if ('' !== $column) {
79 79
                     $data[$columnIndex]['values'][] = trim($column);
80 80
                 }
81 81
             }
82 82
         }
83 83
         // loop data, clean up data:
84
-        foreach($data as $index => $columnInfo) {
84
+        foreach ($data as $index => $columnInfo) {
85 85
             $data[$index]['values'] = array_unique($data[$index]['values']);
86 86
             asort($data[$index]['values']);
87 87
         }
Please login to merge, or discard this patch.
app/Services/CSV/Mapper/OpposingAccounts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
     {
45 45
         Log::debug('Now in OpposingAccounts::getMap()');
46 46
         $result = [];
47
-        $uri    = (string) config('csv_importer.uri');
48
-        $token  = (string) config('csv_importer.access_token');
47
+        $uri    = (string)config('csv_importer.uri');
48
+        $token  = (string)config('csv_importer.access_token');
49 49
         // get list of asset accounts:
50 50
         $request = new GetAccountsRequest($uri, $token);
51 51
         $request->setType(GetAccountsRequest::ALL);
Please login to merge, or discard this patch.
app/Http/Middleware/TrustProxies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
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 = '**';
Please login to merge, or discard this patch.
app/Http/Controllers/Import/MapController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // TODO here we collect all the values from the CSV file.
105 105
         // get columns from file
106 106
         $content   = StorageService::getContent(session()->get(Constants::UPLOAD_CSV_FILE));
107
-        $delimiter = (string) config(sprintf('csv_importer.delimiters.%s', $configuration->getDelimiter()));
107
+        $delimiter = (string)config(sprintf('csv_importer.delimiters.%s', $configuration->getDelimiter()));
108 108
         $data      = MapperService::getMapData($content, $delimiter, $configuration->isHeaders(), $configuration->getSpecifics(), $data);
109 109
 
110 110
         return view('import.map.index', compact('mainTitle', 'subTitle', 'roles', 'data'));
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $values  = !is_array($values) ? [] : $values;
123 123
         $mapping = !is_array($mapping) ? [] : $mapping;
124 124
         $data    = [];
125
-        $configuration   = Configuration::fromArray(session()->get(Constants::CONFIGURATION));
125
+        $configuration = Configuration::fromArray(session()->get(Constants::CONFIGURATION));
126 126
 
127 127
 
128 128
 
Please login to merge, or discard this patch.
app/Http/Controllers/Import/RunController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 
65 65
         // job ID may be in session:
66 66
         $identifier = session()->get(Constants::JOB_IDENTIFIER);
67
-        if(null !== $identifier) {
67
+        if (null !== $identifier) {
68 68
             // create a new import job:
69
-            $routine    = new ImportRoutineManager($identifier);
69
+            $routine = new ImportRoutineManager($identifier);
70 70
         }
71
-        if(null === $identifier) {
71
+        if (null === $identifier) {
72 72
             // create a new import job:
73 73
             $routine    = new ImportRoutineManager();
74 74
             $identifier = $routine->getIdentifier();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         session()->put(Constants::JOB_IDENTIFIER, $identifier);
81 81
         Log::debug(sprintf('Stored "%s" under "%s"', $identifier, Constants::JOB_IDENTIFIER));
82 82
 
83
-        return view('import.run.index', compact('mainTitle', 'subTitle','identifier'));
83
+        return view('import.run.index', compact('mainTitle', 'subTitle', 'identifier'));
84 84
     }
85 85
 
86 86
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             $routine->setConfiguration(Configuration::fromArray(session()->get(Constants::CONFIGURATION)));
103 103
             $routine->setReader(FileReader::getReaderFromSession());
104 104
             $routine->start();
105
-        } catch (ImportException|ErrorException $e) {
105
+        } catch (ImportException | ErrorException $e) {
106 106
             // update job to error state.
107 107
             ImportJobStatusManager::setJobStatus(ImportJobStatus::JOB_ERRORED);
108 108
             $importJobStatus->errors[] = $e->getMessage();
Please login to merge, or discard this patch.
app/Services/Import/Task/Amount.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@
 block discarded – undo
54 54
     {
55 55
         Log::debug(sprintf('Now at the start of processAmount("%s")', $transaction['amount']));
56 56
         if (array_key_exists('amount', $transaction)) {
57
-            $transaction['amount'] = (string) $transaction['amount'];
57
+            $transaction['amount'] = (string)$transaction['amount'];
58 58
         }
59 59
         if (array_key_exists('amount_modifier', $transaction)) {
60
-            $transaction['amount_modifier'] = (string) $transaction['amount_modifier'];
60
+            $transaction['amount_modifier'] = (string)$transaction['amount_modifier'];
61 61
         }
62 62
         if (array_key_exists('foreign_amount', $transaction)) {
63
-            $transaction['foreign_amount'] = (string) $transaction['foreign_amount'];
63
+            $transaction['foreign_amount'] = (string)$transaction['foreign_amount'];
64 64
         }
65 65
 
66 66
         if ('' === $transaction['amount']) {
Please login to merge, or discard this patch.