Code Duplication    Length = 3-3 lines in 2 locations

src/Console/Command/SkuCommand.php 1 location

@@ 70-72 (lines=3) @@
67
        $this->getApp()->appendCommand('product:sku:update', 'Atualiza um SKU', $opts)
68
            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts) {
69
                $list = $app->processInputParameters($opts, $input, $output);
70
                if (!file_exists($list['file'])) {
71
                    throw new \InvalidArgumentException('O arquivo ['.$list['file'].'] não existe!');
72
                }
73
                $data = $app->jsonLoadFromFile($list['file']);
74
                $sdk = $app->factorySdk($list);
75
                $sku = $sdk->createSku($data);

src/Console/Command/OrderCommand.php 1 location

@@ 51-53 (lines=3) @@
48
            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts, $type, $decorator) {
49
                $list = $app->processInputParameters($opts, $input, $output);
50
                $id = $input->getArgument('orderId');
51
                if (!file_exists($list['file'])) {
52
                    throw new \InvalidArgumentException('O arquivo ['.$list['file'].'] não existe!');
53
                }
54
                $data = $app->jsonLoadFromFile($list['file']);
55
                $sdk = $app->factorySdk($list);
56
                $manager = $sdk->factoryManager('order');