Code Duplication    Length = 11-11 lines in 2 locations

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

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

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

@@ 358-368 (lines=11) @@
355
    /**
356
     * {@inheritdoc}
357
     */
358
    public function hasColumn($tableName, $columnName)
359
    {
360
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
361
        foreach ($rows as $column) {
362
            if (strcasecmp($column['name'], $columnName) === 0) {
363
                return true;
364
            }
365
        }
366
367
        return false;
368
    }
369
370
    /**
371
     * {@inheritdoc}