Code Duplication    Length = 10-11 lines in 2 locations

Classes/Commands/Index/CornifyCommand.php 2 locations

@@ 71-80 (lines=10) @@
68
     * @param $indexName
69
     * @return bool
70
     */
71
    private function createConfiguration(InputInterface $input, OutputInterface $output, $helper, $indexName)
72
    {
73
        $question = new ConfirmationQuestion('Configuration does not exist. Shall I create it? [Y/n]', true);
74
        if (!$helper->ask($input, $output, $question)) {
75
            $output->writeln('Cannot continue without configuration.');
76
            return false;
77
        }
78
        $this->configurationService->createConfigurationFromExistingIndex($indexName, $this->indexService->getIndex());
79
        return true;
80
    }
81
82
    /**
83
     * @param \Symfony\Component\Console\Input\InputInterface $input
@@ 88-98 (lines=11) @@
85
     * @param $helper
86
     * @return bool
87
     */
88
    private function compareConfiguration(InputInterface $input, OutputInterface $output, $helper, $indexName)
89
    {
90
        $this->configurationService->compareMappingConfiguration($indexName, $this->indexService->getIndex());
91
        $question = new ConfirmationQuestion('Continue? [Y/n]', true);
92
        if (!$helper->ask($input, $output, $question)) {
93
            $output->writeln('User aborted.');
94
            return false;
95
        } else {
96
            return true;
97
        }
98
    }
99
}
100