Code Duplication    Length = 10-10 lines in 3 locations

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php 1 location

@@ 1438-1447 (lines=10) @@
1435
     *
1436
     * @throws \InvalidArgumentException
1437
     */
1438
    public function getDropIndexSQL($index, $table = null)
1439
    {
1440
        if ($index instanceof Index) {
1441
            $index = $index->getQuotedName($this);
1442
        } elseif (!is_string($index)) {
1443
            throw new \InvalidArgumentException('AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.');
1444
        }
1445
1446
        return 'DROP INDEX ' . $index;
1447
    }
1448
1449
    /**
1450
     * Returns the SQL to drop a constraint.

lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php 1 location

@@ 560-569 (lines=10) @@
557
    /**
558
     * {@inheritDoc}
559
     */
560
    public function getDropTemporaryTableSQL($table)
561
    {
562
        if ($table instanceof Table) {
563
            $table = $table->getQuotedName($this);
564
        } elseif (!is_string($table)) {
565
            throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
566
        }
567
568
        return 'DROP TEMPORARY TABLE ' . $table;
569
    }
570
571
    /**
572
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/MySqlPlatform.php 1 location

@@ 1072-1081 (lines=10) @@
1069
     * MySQL commits a transaction implicitly when DROP TABLE is executed, however not
1070
     * if DROP TEMPORARY TABLE is executed.
1071
     */
1072
    public function getDropTemporaryTableSQL($table)
1073
    {
1074
        if ($table instanceof Table) {
1075
            $table = $table->getQuotedName($this);
1076
        } elseif (!is_string($table)) {
1077
            throw new \InvalidArgumentException('getDropTemporaryTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
1078
        }
1079
1080
        return 'DROP TEMPORARY TABLE ' . $table;
1081
    }
1082
1083
    /**
1084
     * Gets the SQL Snippet used to declare a BLOB column type.