Code Duplication    Length = 14-16 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 2 locations

@@ 184-197 (lines=14) @@
181
    /**
182
     * {@inheritdoc}
183
     */
184
    public function hasTable($tableName)
185
    {
186
        $options = $this->getOptions();
187
188
        $exists = $this->fetchRow(sprintf(
189
            "SELECT TABLE_NAME
190
            FROM INFORMATION_SCHEMA.TABLES
191
            WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'",
192
            $options['name'],
193
            $tableName
194
        ));
195
196
        return !empty($exists);
197
    }
198
199
    /**
200
     * {@inheritdoc}
@@ 1102-1117 (lines=16) @@
1099
     * @param string $tableName Table name
1100
     * @return array
1101
     */
1102
    public function describeTable($tableName)
1103
    {
1104
        $options = $this->getOptions();
1105
1106
        // mysql specific
1107
        $sql = sprintf(
1108
            "SELECT *
1109
             FROM information_schema.tables
1110
             WHERE table_schema = '%s'
1111
             AND table_name = '%s'",
1112
            $options['name'],
1113
            $tableName
1114
        );
1115
1116
        return $this->fetchRow($sql);
1117
    }
1118
1119
    /**
1120
     * Returns MySQL column types (inherited and MySQL specified).