Code Duplication    Length = 8-8 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 351-358 (lines=8) @@
348
        }
349
350
        // create a new column object if only strings were supplied
351
        if (!$columnName instanceof Column) {
352
            $column = new Column();
353
            $column->setName($columnName);
354
            $column->setType($type);
355
            $column->setOptions($options); // map options to column methods
356
        } else {
357
            $column = $columnName;
358
        }
359
360
        // Delegate to Adapters to check column type
361
        if (!$this->getAdapter()->isValidColumnType($column)) {
@@ 391-398 (lines=8) @@
388
    public function addCustomColumn($columnName, $type = null, $options = array())
389
    {
390
        // create a new CustomColumn object if only strings were supplied
391
        if (!$columnName instanceof CustomColumn) {
392
            $column = new CustomColumn();
393
            $column->setName($columnName);
394
            $column->setType($type);
395
            $column->setOptions($options); // map options to column methods
396
        } else {
397
            $column = $columnName;
398
        }
399
400
        $this->columns[] = $column;
401
        return $this;