Code Duplication    Length = 17-17 lines in 2 locations

src/ClientLocal.php 2 locations

@@ 555-571 (lines=17) @@
552
    /**
553
     * @inheritdoc
554
     */
555
    public function deleteColumn($name, $table)
556
    {
557
        $tableGateway = $this->getTableGateway($table);
558
        $success = $tableGateway->dropColumn($name);
559
560
        $response = [
561
            'success' => (bool) $success
562
        ];
563
564
        if (!$success) {
565
            $response['error'] = [
566
                'message' => sprintf('unable_to_remove_column_%s', ['column_name' => $name])
567
            ];
568
        }
569
570
        return $this->createResponseFromData($response);
571
    }
572
573
    /**
574
     * @inheritdoc
@@ 584-600 (lines=17) @@
581
    /**
582
     * @inheritdoc
583
     */
584
    public function deleteTable($name)
585
    {
586
        $tableGateway = $this->getTableGateway($name);
587
        $success = $tableGateway->drop();
588
589
        $response = [
590
            'success' => (bool) $success
591
        ];
592
593
        if (!$success) {
594
            $response['error'] = [
595
                'message' => sprintf('unable_to_remove_table_%s', ['table_name' => $name])
596
            ];
597
        }
598
599
        return $this->createResponseFromData($response);
600
    }
601
602
    /**
603
     * Get a table gateway for the given table name