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 = json_decode(file_get_contents($list['file']), true);
74
                $sdk = $app->factorySdk($list);
75
                $sku = $sdk->createSku($data);

src/Console/Command/OrderCommand.php 1 location

@@ 57-59 (lines=3) @@
54
            ->setCode(function (InputInterface $input, OutputInterface $output) use ($app, $opts, $type, $decorator) {
55
                $list = $app->processInputParameters($opts, $input, $output);
56
                $id = $input->getArgument('orderId');
57
                if (!file_exists($list['file'])) {
58
                    throw new \InvalidArgumentException('O arquivo ['.$list['file'].'] não existe!');
59
                }
60
                $data = json_decode(file_get_contents($list['file']), true);
61
                $sdk = $app->factorySdk($list);
62
                $manager = $sdk->factoryManager('order');