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}
@@ 1252-1267 (lines=16) @@
1249
     * @param string $tableName Table name
1250
     * @return array
1251
     */
1252
    public function describeTable($tableName)
1253
    {
1254
        $options = $this->getOptions();
1255
1256
        // mysql specific
1257
        $sql = sprintf(
1258
            "SELECT *
1259
             FROM information_schema.tables
1260
             WHERE table_schema = '%s'
1261
             AND table_name = '%s'",
1262
            $options['name'],
1263
            $tableName
1264
        );
1265
1266
        return $this->fetchRow($sql);
1267
    }
1268
1269
    /**
1270
     * Returns MySQL column types (inherited and MySQL specified).