Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 643-653 (lines=11) @@
640
    /**
641
     * {@inheritdoc}
642
     */
643
    public function hasColumn($tableName, $columnName)
644
    {
645
        $rows = $this->getTableInfo($tableName);
646
        foreach ($rows as $column) {
647
            if (strcasecmp($column['name'], $columnName) === 0) {
648
                return true;
649
            }
650
        }
651
652
        return false;
653
    }
654
655
    /**
656
     * {@inheritdoc}

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

@@ 452-462 (lines=11) @@
449
    /**
450
     * {@inheritdoc}
451
     */
452
    public function hasColumn($tableName, $columnName)
453
    {
454
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
455
        foreach ($rows as $column) {
456
            if (strcasecmp($column['Field'], $columnName) === 0) {
457
                return true;
458
            }
459
        }
460
461
        return false;
462
    }
463
464
    /**
465
     * {@inheritdoc}