Code Duplication    Length = 16-16 lines in 2 locations

src/Tequilarapido/Cli/Commands/Base/AbstractDatabaseConvertToEngine.php 1 location

@@ 59-74 (lines=16) @@
56
    /**
57
     * @param string $engine
58
     */
59
    protected function setEngine($engine)
60
    {
61
        $this->output->title("Setting database engine to $engine");
62
63
        // Cli progress setup
64
        $progress = $this->getHelperSet()->get('progress');
65
        $progress->start($this->output, count($this->databaseTables));
66
67
        foreach ($this->databaseTables as $tableName) {
68
69
            $this->output->info($tableName);
70
            $this->table->alterEngine($tableName, $engine);
71
            $progress->advance();
72
        }
73
        $progress->finish();
74
    }
75
76
}

src/Tequilarapido/Cli/Commands/DatabaseConvertToUtf8.php 1 location

@@ 63-78 (lines=16) @@
60
     * @param string $charset
61
     * @param string $collation
62
     */
63
    protected function setCharsetAndCollation($charset, $collation)
64
    {
65
        $this->output->title("Setting database charset to $charset and collation to $collation");
66
67
        // Cli progress setup
68
        $progress = $this->getHelperSet()->get('progress');
69
        $progress->start($this->output, count($this->databaseTables));
70
71
        foreach ($this->databaseTables as $tableName) {
72
73
            $this->output->info($tableName);
74
            $this->table->alterCharsetAndCollation($tableName, $charset, $collation);
75
            $progress->advance();
76
        }
77
        $progress->finish();
78
    }
79
80
}