Completed
Push — master ( 7f3ed3...4200af )
by Gilmar
22:41
created
src/Console/Command/ScreenplayCommand.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
                 $s = 'screenplay:'.$key;
46 46
                 $command = $app->find($s);
47 47
                 $t = new ArrayInput([
48
-                   'command' => $s,
49
-                   'path'    => $path,
48
+                    'command' => $s,
49
+                    'path'    => $path,
50 50
                 ]);
51 51
 
52 52
                 $command->run($t, $output);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $this->getApp()->appendCommand('screenplay:run', 'Run all scripts')
39 39
         ->addArgument('path', InputArgument::REQUIRED, 'Script Directory')
40
-        ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $screenplayList) {
40
+        ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $screenplayList) {
41 41
             $path = $input->getArgument('path');
42 42
             $output->writeln('Utilizando arquivos do diretório ['.$path.']');
43 43
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $filename = str_replace([$f.':', ':'], [$f.'/', '.'], $key).'.php';
64 64
             $this->getApp()->appendCommand($cname, $todo)
65 65
                 ->addArgument('path', InputArgument::REQUIRED, 'Script Directory')
66
-                ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $filename, $todo, $cname) {
66
+                ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $filename, $todo, $cname) {
67 67
                     $list = $app->processInputParameters([], $input, $output);
68 68
                     $path = $input->getArgument('path');
69 69
 
Please login to merge, or discard this patch.
src/Console/Command/ProductCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function fetch($app)
31 31
     {
32 32
         $this->getApp()->appendCommand('product:list', 'List')
33
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
33
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
34 34
                 $list = $app->processInputParameters([], $input, $output);
35 35
                 $collection = $app->factorySdk($list)->factoryManager('product')->fetch(0, 50);
36 36
                 foreach ($collection as $p) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         ];
48 48
 
49 49
         $this->getApp()->appendCommand('product:insert', 'Insere um produto a partir do Json de um arquivo', $opts)
50
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts) {
50
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $opts) {
51 51
                 $list = $app->processInputParameters($opts, $input, $output);
52 52
 
53 53
                 $data = $app->jsonLoadFromFile($list['file']);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->getApp()->appendCommand('product:translate:to', 'Exporta o produto no padrão comum')
72 72
             ->addArgument('productId', InputArgument::REQUIRED, 'Product ID')
73 73
             ->addArgument('filenameOutput', InputArgument::REQUIRED, 'Caminho do arquivo que será gerado')
74
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
74
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
75 75
                 $list = $app->processInputParameters([], $input, $output);
76 76
                 $id = $input->getArgument('productId');
77 77
                 $filenameOutput = $input->getArgument('filenameOutput');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->getApp()->appendCommand('product:translate:update', 'Atualiza o produto (schema)')
91 91
             ->addArgument('filenameInput', InputArgument::REQUIRED, 'Arquivo json com dados do produto')
92 92
             ->addArgument('filenamePrevious', InputArgument::OPTIONAL, 'Previous file')
93
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
93
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
94 94
                 $list = $app->processInputParameters([], $input, $output);
95 95
                 $filenameInput = $input->getArgument('filenameInput');
96 96
                 $current = new TranslatorDataCollection($app->jsonLoadFromFile($filenameInput));
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $this->getApp()->appendCommand('product:view', 'Consulta a situação de um produto')
119 119
             ->addArgument('productId', InputArgument::REQUIRED, 'Product ID')
120
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
120
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
121 121
                 $list = $app->processInputParameters([], $input, $output);
122 122
                 $id = $input->getArgument('productId');
123 123
                 $p = $app->factorySdk($list)->factoryManager('product')->findById($id);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $this->getApp()->appendCommand('product:status', 'Consulta o status de um produto')
144 144
             ->addArgument('productId', InputArgument::REQUIRED, 'Product ID')
145
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
145
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
146 146
                 $list = $app->processInputParameters([], $input, $output);
147 147
                 $id = $input->getArgument('productId');
148 148
                 $output->writeln('Status do Product #<info>'.$id.'</info>');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         ];
160 160
 
161 161
         $this->getApp()->appendCommand('product:update', 'Atualiza um SKU', $opts)
162
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts) {
162
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $opts) {
163 163
                 $list = $app->processInputParameters($opts, $input, $output);
164 164
 
165 165
                 $data = [];
Please login to merge, or discard this patch.
src/Console/Command/TemplatesCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             'sizes',
33 33
         ] as $templateKey) {
34 34
             $this->getApp()->appendCommand('templates:'.$templateKey, 'List of '.$templateKey)
35
-                ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $templateKey) {
35
+                ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $templateKey) {
36 36
                     $list = $app->processInputParameters([], $input, $output);
37 37
                     $responseList = $app->factorySdk($list)->factoryManager('templates')->fetchByRoute($templateKey);
38 38
                     $app->displayTableResults($output, $responseList);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $this->getApp()->appendCommand('templates:departments', 'List of departments')
43 43
             ->addArgument('buId', InputArgument::REQUIRED, 'Business unit id - NS = Netshoes e ZT = Zattini')
44
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
44
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
45 45
                 $list = $app->processInputParameters([], $input, $output);
46 46
                 $responseList = $app->factorySdk($list)->factoryManager('templates')
47 47
                     ->fetchByRoute('departments', 0, 50, [
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         $this->getApp()->appendCommand('templates:productTypes', 'List of productTypes')
54 54
             ->addArgument('departmentCode', InputArgument::REQUIRED, 'Id do departamento')
55
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
55
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
56 56
                 $list = $app->processInputParameters([], $input, $output);
57 57
                 $responseList = $app->factorySdk($list)->factoryManager('templates')
58 58
                     ->fetchByRoute('productTypes', 0, 50, [
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $this->getApp()->appendCommand('templates:attributes', 'List of attributes')
65 65
             ->addArgument('departmentCode', InputArgument::REQUIRED, 'Id do departamento')
66 66
             ->addArgument('productTypeCode', InputArgument::REQUIRED, 'Id do Product Type')
67
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
67
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
68 68
                 $list = $app->processInputParameters([], $input, $output);
69 69
                 $responseList = $app->factorySdk($list)->factoryManager('templates')
70 70
                     ->fetchByRoute('attributes', 0, 50, [
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $this->getApp()->appendCommand('templates:tree', 'Tree of templates')
78 78
             ->addArgument('buId', InputArgument::REQUIRED, 'Business unit id - NS = Netshoes e ZT = Zattini')
79
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
79
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
80 80
                 $list = $app->processInputParameters([], $input, $output);
81 81
                 $buId = $input->getArgument('buId');
82 82
                 $manager = $app->factorySdk($list)->factoryManager('templates');
Please login to merge, or discard this patch.
src/Console/Command/SkuCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->getApp()->appendCommand('product:sku:view', 'Mostra os SKUs de um Produto')
31 31
             ->addArgument('productId', InputArgument::REQUIRED, 'Product ID')
32
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
32
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
33 33
                 $list = $app->processInputParameters([], $input, $output);
34 34
                 $id = $input->getArgument('productId');
35 35
                 $output->writeln('Exibindo informações do SKU #<info>'.$id.'</info>');
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->getApp()->appendCommand('product:sku:details', 'Mostra preço, estoque e situação de um SKU')
47 47
             ->addArgument('skuId', InputArgument::REQUIRED, 'Sku ID')
48
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
48
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
49 49
                 $list = $app->processInputParameters([], $input, $output);
50 50
                 $sku = $app->factorySdk($list)->factoryManager('sku')
51 51
                     ->findById($input->getArgument('skuId'));
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         ];
66 66
 
67 67
         $this->getApp()->appendCommand('product:sku:update', 'Atualiza um SKU', $opts)
68
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts) {
68
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $opts) {
69 69
                 $list = $app->processInputParameters($opts, $input, $output);
70 70
                 if (!file_exists($list['file'])) {
71 71
                     throw new \InvalidArgumentException('O arquivo ['.$list['file'].'] não existe!');
Please login to merge, or discard this patch.
src/Console/Command/OrderCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $this->getApp()->appendCommand('order:update:to:'.$type, 'Move um pedido para a situação ['.$type.']', $opts)
47 47
             ->addArgument('orderId', InputArgument::REQUIRED, 'Product ID')
48
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts, $type, $decorator) {
48
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $opts, $type, $decorator) {
49 49
                 $list = $app->processInputParameters($opts, $input, $output);
50 50
                 $id = $input->getArgument('orderId');
51 51
                 if (!file_exists($list['file'])) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $this->getApp()->appendCommand('order:view', 'Mostra detalhes de um pedido')
82 82
             ->addArgument('orderId', InputArgument::REQUIRED, 'Product ID')
83
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
83
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
84 84
                 $list = $app->processInputParameters([], $input, $output);
85 85
                 $id = $input->getArgument('orderId');
86 86
                 $p = $app->factorySdk($list)->factoryManager('order')->findById($id);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     protected function factoryList($app, $type)
92 92
     {
93 93
         $this->getApp()->appendCommand('order:list:'.$type, 'Mostra os pedidos mais recentes em status ['.$type.']')
94
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $type) {
94
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $type) {
95 95
                 $list = $app->processInputParameters([], $input, $output);
96 96
                 $collection = $app->factorySdk($list)->factoryManager('order')
97 97
                 ->translatorFetch(0, 50, ['orderStatus' => $type]);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     protected function queue($app)
103 103
     {
104 104
         $this->getApp()->appendCommand('order:queue', 'Mostra os pedidos novos e que ainda aguardam processamento')
105
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
105
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
106 106
                 $list = $app->processInputParameters([], $input, $output);
107 107
                 $collection = $app->factorySdk($list)->factoryManager('order')->fetchQueue();
108 108
                 $app->displayOrderList($collection, $output);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $this->getApp()->appendCommand('order:translate:to', 'Exporta o pedido no padrão comum')
115 115
             ->addArgument('orderId', InputArgument::REQUIRED, 'Order ID')
116 116
             ->addArgument('filenameOutput', InputArgument::REQUIRED, 'Caminho do arquivo que será gerado')
117
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
117
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
118 118
                 $list = $app->processInputParameters([], $input, $output);
119 119
                 $id = $input->getArgument('orderId');
120 120
                 $filenameOutput = $input->getArgument('filenameOutput');
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $this->getApp()->appendCommand('order:translate:from', 'Importa o pedido no padrão comum')
134 134
             ->addArgument('filenameInput', InputArgument::REQUIRED, 'Arquivo json com dados do pedido')
135
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
135
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) {
136 136
                 $list = $app->processInputParameters([], $input, $output);
137 137
                 $foreign = new TranslatorDataCollection($app->jsonLoadFromFile($input->getArgument('filenameInput')));
138 138
 
Please login to merge, or discard this patch.
src/Console/Command/DetailCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         ];
35 35
 
36 36
         $this->getApp()->appendCommand('product:sku:detail:update', 'Atualiza detalhes de um SKU', $opts)
37
-            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts) {
37
+            ->setCode(function(InputInterface $input, OutputInterface $output) use ($app, $opts) {
38 38
                 $list = $app->processInputParameters($opts, $input, $output);
39 39
 
40 40
                 $data = $app->jsonLoadFromFile($list['file']);
Please login to merge, or discard this patch.
src/Entity/Order/map/translate.native.map.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
  */
14 14
 
15 15
 return [
16
-     'merchant' => [
17
-         'name'         => $native->getOriginSite(),
18
-         'marketplace'  => 'NETSHOES',
19
-         'originNumber' => $native->getOriginNumber(),
20
-     ],
21
-     'orderNumber'    => $native->getId(),
22
-     'acceptedOffer'  => $native->getItems()->toSchema(),
23
-     'orderStatus'    => $native->getOrderStatus(),
24
-     'orderDate'      => $native->getOrderDate(),
25
-     'customer'       => $native->getShipping()->getCustomer()->toSchema(),
26
-     'billingAddress' => $native->getShipping()->getCustomer()->getAddress()->toSchema(),
27
-     'currency'       => 'BRL',
28
-     'price'          => $native->getTotalNet(),
29
-     'discount'       => $native->getTotalDiscount(),
30
-     'quantity'       => $native->getTotalQuantity(),
31
-     'freight'        => $native->getTotalFreight(),
32
-     'total'          => $native->getTotalGross(),
33
- ];
16
+        'merchant' => [
17
+            'name'         => $native->getOriginSite(),
18
+            'marketplace'  => 'NETSHOES',
19
+            'originNumber' => $native->getOriginNumber(),
20
+        ],
21
+        'orderNumber'    => $native->getId(),
22
+        'acceptedOffer'  => $native->getItems()->toSchema(),
23
+        'orderStatus'    => $native->getOrderStatus(),
24
+        'orderDate'      => $native->getOrderDate(),
25
+        'customer'       => $native->getShipping()->getCustomer()->toSchema(),
26
+        'billingAddress' => $native->getShipping()->getCustomer()->getAddress()->toSchema(),
27
+        'currency'       => 'BRL',
28
+        'price'          => $native->getTotalNet(),
29
+        'discount'       => $native->getTotalDiscount(),
30
+        'quantity'       => $native->getTotalQuantity(),
31
+        'freight'        => $native->getTotalFreight(),
32
+        'total'          => $native->getTotalGross(),
33
+    ];
Please login to merge, or discard this patch.
src/Entity/Order/map/restful.map.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
  * For more information, see <https://www.gpupo.com/>.
13 13
  */
14 14
 
15
-$put = function ($name) {
15
+$put = function($name) {
16 16
     return [
17 17
         'PUT',
18 18
         '/orders/{itemId}/shippings/{shippingCode}/status/'.$name,
Please login to merge, or discard this patch.
src/Entity/Order/Shippings/Sender.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
     public function getSchema()
28 28
     {
29 29
         return [
30
-              'sellerCode'   => 'integer',
31
-              'sellerName'   => 'string',
32
-              'supplierCnpj' => 'string',
33
-              'supplierName' => 'string',
30
+                'sellerCode'   => 'integer',
31
+                'sellerName'   => 'string',
32
+                'supplierCnpj' => 'string',
33
+                'supplierName' => 'string',
34 34
         ];
35 35
     }
36 36
 }
Please login to merge, or discard this patch.