Code Duplication    Length = 5-5 lines in 2 locations

src/Command/CreateDatabaseCommand.php 1 location

@@ 35-39 (lines=5) @@
32
     */
33
    protected function execute(InputInterface $input, OutputInterface $output)
34
    {
35
        if ($this->connection->exists() && !$input->getOption('if-not-exists')) {
36
            $this->io->error('Database "'.$this->connection->getName().'" already exists.');
37
38
            return 1;
39
        }
40
41
        if ($this->connection->exists()) {
42
            $this->io->comment('Database <comment>'.$this->connection->getName().'</comment> already exists. Skipped.');

src/Command/DropDatabaseCommand.php 1 location

@@ 48-52 (lines=5) @@
45
            return 1;
46
        }
47
48
        if (!$this->connection->exists() && !$input->getOption('if-exists')) {
49
            $this->io->error('Database "'.$this->connection->getName().'" does not exist.');
50
51
            return 1;
52
        }
53
54
        if (!$this->connection->exists()) {
55
            $this->io->comment('Database <comment>'.$this->connection->getName().'</comment> does not exist. Skipped.');