Completed
Push — master ( 1d95d9...41eac6 )
by Gilmar
21:32
created
src/Console/Command/SkuCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
     public static function append(Application $app)
20 20
     {
21 21
         $insertOptions = [
22
-            ['key'   => 'file'],
22
+            [ 'key'   => 'file' ],
23 23
         ];
24 24
 
25 25
         $app->appendCommand('product:sku:update', 'Atualiza um SKU')
26 26
             ->setDefinition($app->factoryDefinition($insertOptions))
27
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $insertOptions) {
27
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $insertOptions) {
28 28
                 $list = $app->processInputParameters($insertOptions, $input, $output);
29 29
 
30
-                $data = json_decode(file_get_contents($list['file']), true);
30
+                $data = json_decode(file_get_contents($list[ 'file' ]), true);
31 31
                 $sdk = $app->factorySdk($list);
32 32
                 $product = $sdk->createSku($data);
33 33
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 
41 41
                 } catch (\Exception $e) {
42 42
                     $output->writeln('<error>Erro na criação</error>');
43
-                    $output->writeln('Message: <comment>'.$e->getMessage().'</comment>');
44
-                    $output->writeln('Code: <comment>'.$e->getCode().'</comment>');
43
+                    $output->writeln('Message: <comment>' . $e->getMessage() . '</comment>');
44
+                    $output->writeln('Code: <comment>' . $e->getCode() . '</comment>');
45 45
                 }
46 46
         });
47 47
 
Please login to merge, or discard this patch.