Code Duplication    Length = 11-13 lines in 2 locations

source/Spiral/Database/Schemas/Prototypes/AbstractTable.php 2 locations

@@ 501-511 (lines=11) @@
498
     *
499
     * @throws SchemaException
500
     */
501
    public function dropColumn(string $column): AbstractTable
502
    {
503
        if (empty($schema = $this->current->findColumn($column))) {
504
            throw new SchemaException("Undefined column '{$column}' in '{$this->getName()}'");
505
        }
506
507
        //Dropping column from current schema
508
        $this->current->forgetColumn($schema);
509
510
        return $this;
511
    }
512
513
    /**
514
     * Drop index by it's forming columns.
@@ 545-557 (lines=13) @@
542
     *
543
     * @throws SchemaException
544
     */
545
    public function dropForeign($column): AbstractTable
546
    {
547
        if (!empty($schema = $this->current->findForeign($column))) {
548
            throw new SchemaException(
549
                "Undefined FK on '{$column}' in '{$this->getName()}'"
550
            );
551
        }
552
553
        //Dropping foreign from current schema
554
        $this->current->forgetForeign($schema);
555
556
        return $this;
557
    }
558
559
    /**
560
     * Reset table state to new form.