Code Duplication    Length = 11-11 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 1 location

@@ 360-370 (lines=11) @@
357
    /**
358
     * {@inheritdoc}
359
     */
360
    public function hasColumn($tableName, $columnName)
361
    {
362
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
363
        foreach ($rows as $column) {
364
            if (strcasecmp($column['Field'], $columnName) === 0) {
365
                return true;
366
            }
367
        }
368
369
        return false;
370
    }
371
372
    /**
373
     * Get the defintion for a `DEFAULT` statement.

src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location

@@ 298-308 (lines=11) @@
295
    /**
296
     * {@inheritdoc}
297
     */
298
    public function hasColumn($tableName, $columnName)
299
    {
300
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
301
        foreach ($rows as $column) {
302
            if (strcasecmp($column['name'], $columnName) === 0) {
303
                return true;
304
            }
305
        }
306
307
        return false;
308
    }
309
310
    /**
311
     * {@inheritdoc}