Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 471-481 (lines=11) @@
468
    /**
469
     * {@inheritdoc}
470
     */
471
    public function hasColumn($tableName, $columnName)
472
    {
473
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
474
        foreach ($rows as $column) {
475
            if (strcasecmp($column['Field'], $columnName) === 0) {
476
                return true;
477
            }
478
        }
479
480
        return false;
481
    }
482
483
    /**
484
     * {@inheritdoc}

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

@@ 381-391 (lines=11) @@
378
    /**
379
     * {@inheritdoc}
380
     */
381
    public function hasColumn($tableName, $columnName)
382
    {
383
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
384
        foreach ($rows as $column) {
385
            if (strcasecmp($column['name'], $columnName) === 0) {
386
                return true;
387
            }
388
        }
389
390
        return false;
391
    }
392
393
    /**
394
     * {@inheritdoc}