Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 373-383 (lines=11) @@
370
    /**
371
     * {@inheritdoc}
372
     */
373
    public function hasColumn($tableName, $columnName)
374
    {
375
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
376
        foreach ($rows as $column) {
377
            if (strcasecmp($column['Field'], $columnName) === 0) {
378
                return true;
379
            }
380
        }
381
382
        return false;
383
    }
384
385
    /**
386
     * {@inheritdoc}

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

@@ 318-328 (lines=11) @@
315
    /**
316
     * {@inheritdoc}
317
     */
318
    public function hasColumn($tableName, $columnName)
319
    {
320
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
321
        foreach ($rows as $column) {
322
            if (strcasecmp($column['name'], $columnName) === 0) {
323
                return true;
324
            }
325
        }
326
327
        return false;
328
    }
329
330
    /**
331
     * {@inheritdoc}