Code Duplication    Length = 19-19 lines in 2 locations

src/N98/Magento/Command/Developer/Ide/PhpStorm/MetaCommand.php 2 locations

@@ 468-486 (lines=19) @@
465
    ];
466
}
467
PHP;
468
            if ($input->getOption('stdout')) {
469
                $output->writeln($map);
470
            } else {
471
                $metaPath = $this->_magentoRootFolder . '/.phpstorm.meta.php';
472
                if (is_file($metaPath)) {
473
                    if (\unlink($metaPath)) {
474
                        $output->writeln('<info>Deprecated file <comment>.phpstorm.meta.php</comment> removed</info>');
475
                    }
476
                }
477
                if (!is_dir($metaPath)) {
478
                    if (\mkdir($metaPath)) {
479
                        $output->writeln('<info>Directory <comment>.phpstorm.meta.php</comment> created</info>');
480
                    }
481
                }
482
                $group = str_replace(array(' ', '/'), '_', $group);
483
                if (\file_put_contents($this->_magentoRootFolder . '/.phpstorm.meta.php/magento_' . $group . '.meta.php', $map)) {
484
                    $output->writeln('<info>File <comment>.phpstorm.meta.php/magento_' . $group . '.meta.php</comment> generated</info>');
485
                }
486
            }
487
        }
488
489
        $baseMap = <<<PHP
@@ 550-568 (lines=19) @@
547
            $map .= <<<PHP
548
}
549
PHP;
550
            if ($input->getOption('stdout')) {
551
                $output->writeln($map);
552
            } else {
553
                $metaPath = $this->_magentoRootFolder . '/.phpstorm.meta.php';
554
                if (is_file($metaPath)) {
555
                    if (\unlink($metaPath)) {
556
                        $output->writeln('<info>Deprecated file <comment>.phpstorm.meta.php</comment> removed</info>');
557
                    }
558
                }
559
                if (!is_dir($metaPath)) {
560
                    if (\mkdir($metaPath)) {
561
                        $output->writeln('<info>Directory <comment>.phpstorm.meta.php</comment> created</info>');
562
                    }
563
                }
564
                $group = str_replace(array(' ', '/'), '_', $group);
565
                if (\file_put_contents($this->_magentoRootFolder . '/.phpstorm.meta.php/magento_' . $group . '.meta.php', $map)) {
566
                    $output->writeln('<info>File <comment>.phpstorm.meta.php/magento_' . $group . '.meta.php</comment> generated</info>');
567
                }
568
            }
569
        }
570
571
        $baseMap = <<<PHP