Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 425-435 (lines=11) @@
422
    /**
423
     * {@inheritdoc}
424
     */
425
    public function hasColumn($tableName, $columnName)
426
    {
427
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
428
        foreach ($rows as $column) {
429
            if (strcasecmp($column['Field'], $columnName) === 0) {
430
                return true;
431
            }
432
        }
433
434
        return false;
435
    }
436
437
    /**
438
     * {@inheritdoc}

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

@@ 395-405 (lines=11) @@
392
    /**
393
     * {@inheritdoc}
394
     */
395
    public function hasColumn($tableName, $columnName)
396
    {
397
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
398
        foreach ($rows as $column) {
399
            if (strcasecmp($column['name'], $columnName) === 0) {
400
                return true;
401
            }
402
        }
403
404
        return false;
405
    }
406
407
    /**
408
     * {@inheritdoc}