Code Duplication    Length = 14-16 lines in 2 locations

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

@@ 190-203 (lines=14) @@
187
    /**
188
     * {@inheritdoc}
189
     */
190
    public function hasTable($tableName)
191
    {
192
        $options = $this->getOptions();
193
194
        $exists = $this->fetchRow(sprintf(
195
            "SELECT TABLE_NAME
196
            FROM INFORMATION_SCHEMA.TABLES
197
            WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'",
198
            $options['name'],
199
            $tableName
200
        ));
201
202
        return !empty($exists);
203
    }
204
205
    /**
206
     * {@inheritdoc}
@@ 1222-1237 (lines=16) @@
1219
     * @param string $tableName Table name
1220
     * @return array
1221
     */
1222
    public function describeTable($tableName)
1223
    {
1224
        $options = $this->getOptions();
1225
1226
        // mysql specific
1227
        $sql = sprintf(
1228
            "SELECT *
1229
             FROM information_schema.tables
1230
             WHERE table_schema = '%s'
1231
             AND table_name = '%s'",
1232
            $options['name'],
1233
            $tableName
1234
        );
1235
1236
        return $this->fetchRow($sql);
1237
    }
1238
1239
    /**
1240
     * Returns MySQL column types (inherited and MySQL specified).