Code Duplication    Length = 8-8 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 342-349 (lines=8) @@
339
        }
340
341
        // create a new column object if only strings were supplied
342
        if (!$columnName instanceof Column) {
343
            $column = new Column();
344
            $column->setName($columnName);
345
            $column->setType($type);
346
            $column->setOptions($options); // map options to column methods
347
        } else {
348
            $column = $columnName;
349
        }
350
351
        // Delegate to Adapters to check column type
352
        if (!$this->getAdapter()->isValidColumnType($column)) {
@@ 381-388 (lines=8) @@
378
    public function addCustomColumn($columnName, $type = null, $options = array())
379
    {
380
        // create a new CustomColumn object if only strings were supplied
381
        if (!$columnName instanceof CustomColumn) {
382
            $column = new CustomColumn();
383
            $column->setName($columnName);
384
            $column->setType($type);
385
            $column->setOptions($options); // map options to column methods
386
        } else {
387
            $column = $columnName;
388
        }
389
390
        $this->columns[] = $column;
391
        return $this;