Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 355-365 (lines=11) @@
352
    /**
353
     * {@inheritdoc}
354
     */
355
    public function hasColumn($tableName, $columnName)
356
    {
357
        $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName)));
358
        foreach ($rows as $column) {
359
            if (strcasecmp($column['Field'], $columnName) === 0) {
360
                return true;
361
            }
362
        }
363
364
        return false;
365
    }
366
367
    /**
368
     * Get the defintion for a `DEFAULT` statement.

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

@@ 284-294 (lines=11) @@
281
    /**
282
     * {@inheritdoc}
283
     */
284
    public function hasColumn($tableName, $columnName)
285
    {
286
        $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName)));
287
        foreach ($rows as $column) {
288
            if (strcasecmp($column['name'], $columnName) === 0) {
289
                return true;
290
            }
291
        }
292
293
        return false;
294
    }
295
296
    /**
297
     * {@inheritdoc}