Test Failed
Push — master ( 045eb7...da5525 )
by Nur
08:45
created
src/Commands/CurrencyManage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function __construct()
45 45
     {
46 46
         $this->storage = app('currency')->getDriver();
47
-        $this->currencies = include(__DIR__ . '/../../resources/currencies.php');
47
+        $this->currencies = include(__DIR__.'/../../resources/currencies.php');
48 48
 
49 49
         parent::__construct();
50 50
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $data['code'] = $currency;
93 93
 
94 94
         if (is_string($result = $this->storage->create($data))) {
95
-            $this->output->writeln('<error>' . ($result ?: 'Failed') . '</error>');
95
+            $this->output->writeln('<error>'.($result ?: 'Failed').'</error>');
96 96
         } else {
97 97
             $this->output->writeln("<info>success</info>");
98 98
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $this->output->write("Updating {$currency} currency...");
116 116
 
117 117
         if (is_string($result = $this->storage->update($currency, $data))) {
118
-            $this->output->writeln('<error>' . ($result ?: 'Failed') . '</error>');
118
+            $this->output->writeln('<error>'.($result ?: 'Failed').'</error>');
119 119
         } else {
120 120
             $this->output->writeln("<info>success</info>");
121 121
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $this->output->write("Deleting {$currency} currency...");
134 134
 
135 135
         if (is_string($result = $this->storage->delete($currency))) {
136
-            $this->output->writeln('<error>' . ($result ?: 'Failed') . '</error>');
136
+            $this->output->writeln('<error>'.($result ?: 'Failed').'</error>');
137 137
         } else {
138 138
             $this->output->writeln("<info>success</info>");
139 139
         }
Please login to merge, or discard this patch.
src/Commands/CurrencyUpdate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         }
77 77
 
78 78
         if ($this->input->getOption('openexchangerates')) {
79
-            if (! $api = $this->currency->config('api_key')) {
79
+            if (!$api = $this->currency->config('api_key')) {
80 80
                 $this->error('An API key is needed from OpenExchangeRates.org to continue.');
81 81
 
82 82
                 return;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 continue;
174 174
             }
175 175
 
176
-            $response = $this->request('http://finance.google.com/finance/converter?a=1&from=' . $defaultCurrency . '&to=' . $code);
176
+            $response = $this->request('http://finance.google.com/finance/converter?a=1&from='.$defaultCurrency.'&to='.$code);
177 177
 
178 178
             if (Str::contains($response, 'bld>')) {
179 179
                 $data = explode('bld>', $response);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                     'exchange_rate' => $rate,
184 184
                 ]);
185 185
             } else {
186
-                $this->warn('Can\'t update rate for ' . $code);
186
+                $this->warn('Can\'t update rate for '.$code);
187 187
                 continue;
188 188
             }
189 189
         }
Please login to merge, or discard this patch.
src/Currency.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         $to = $to ?: $this->getUserCurrency();
78 78
 
79 79
         // Get exchange rates
80
-        (float)$from_rate = $this->getCurrencyProp($from, 'exchange_rate');
81
-        (float)$to_rate = $this->getCurrencyProp($to, 'exchange_rate');
80
+        (float) $from_rate = $this->getCurrencyProp($from, 'exchange_rate');
81
+        (float) $to_rate = $this->getCurrencyProp($to, 'exchange_rate');
82 82
 
83 83
         // Skip invalid to currency rates
84 84
         if ($to_rate === null) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         }
168 168
 
169 169
         // Return value
170
-        return $negative . $value;
170
+        return $negative.$value;
171 171
     }
172 172
 
173 173
     /**
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             if (config('app.debug', false) === true) {
241 241
                 $this->currencies_cache = $this->getDriver()->all();
242 242
             } else {
243
-                $this->currencies_cache = $this->cache->rememberForever('torann.currency', function () {
243
+                $this->currencies_cache = $this->cache->rememberForever('torann.currency', function() {
244 244
                     return $this->getDriver()->all();
245 245
                 });
246 246
             }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function getActiveCurrencies()
258 258
     {
259
-        return array_filter($this->getCurrencies(), function ($currency) {
259
+        return array_filter($this->getCurrencies(), function($currency) {
260 260
             return $currency['active'] == true;
261 261
         });
262 262
     }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     {
270 270
         if ($this->driver === null) {
271 271
             // Get driver configuration
272
-            $config = $this->config('drivers.' . $this->config('driver'), []);
272
+            $config = $this->config('drivers.'.$this->config('driver'), []);
273 273
 
274 274
             // Get driver class
275 275
             $driver = Arr::pull($config, 'class');
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     {
290 290
         if ($this->formatter === null && $this->config('formatter') !== null) {
291 291
             // Get formatter configuration
292
-            $config = $this->config('formatters.' . $this->config('formatter'), []);
292
+            $config = $this->config('formatters.'.$this->config('formatter'), []);
293 293
 
294 294
             // Get formatter class
295 295
             $class = Arr::pull($config, 'class');
Please login to merge, or discard this patch.
src/Seeds/BanksTableSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $file = __DIR__.'/../../resources/banks.json';
14 14
         $data = json_decode(file_get_contents($file), true);
15
-        $banks = array_map(function ($arr) {
15
+        $banks = array_map(function($arr) {
16 16
             return [
17 17
                 'name' => $arr['name'],
18 18
                 'alias' => $arr['alias'],
Please login to merge, or discard this patch.
src/Helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('currency')) {
3
+if (!function_exists('currency')) {
4 4
     /**
5 5
      * Convert given number.
6 6
      *
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     }
22 22
 }
23 23
 
24
-if (! function_exists('currency_format')) {
24
+if (!function_exists('currency_format')) {
25 25
     /**
26 26
      * Format given number.
27 27
      *
Please login to merge, or discard this patch.