Code Duplication    Length = 20-20 lines in 2 locations

src/ElasticsearchExtraBundle/Command/CreateIndexCommand.php 1 location

@@ 36-55 (lines=20) @@
33
        ;
34
    }
35
36
    protected function execute(InputInterface $input, OutputInterface $output)
37
    {
38
        $clientId = $input->getArgument('client_id');
39
        $indexId  = $input->getArgument('index_id');
40
        
41
        $output->writeln(sprintf(
42
            '<info>Creating index "%s" for client "%s"...</info>',
43
            $indexId,
44
            $clientId
45
        ));
46
        
47
        $handler = $this
48
            ->getContainer()
49
            ->get('gbprod.elasticsearch_extra.create_index_handler')
50
        ;
51
        
52
        $handler->handle($clientId, $indexId);
53
        
54
        $output->writeln('<info>done</info>');
55
    }
56
}

src/ElasticsearchExtraBundle/Command/DeleteIndexCommand.php 1 location

@@ 51-70 (lines=20) @@
48
        }
49
    }
50
    
51
    private function deleteIndex(InputInterface $input, OutputInterface $output)
52
    {
53
        $clientId = $input->getArgument('client_id');
54
        $indexId  = $input->getArgument('index_id');
55
        
56
        $output->writeln(sprintf(
57
            '<info>Deleting index "%s" for client "%s"...</info>',
58
            $indexId,
59
            $clientId
60
        ));
61
        
62
        $handler = $this
63
            ->getContainer()
64
            ->get('gbprod.elasticsearch_extra.delete_index_handler')
65
        ;
66
        
67
        $handler->handle($clientId, $indexId);
68
        
69
        $output->writeln('<info>done</info>');
70
    }
71
    
72
    private function displayWarningMassage(InputInterface $input, OutputInterface $output)
73
    {