Code Duplication    Length = 13-13 lines in 2 locations

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php 2 locations

@@ 2356-2368 (lines=13) @@
2353
     *
2354
     * @throws \InvalidArgumentException
2355
     */
2356
    public function getUniqueConstraintDeclarationSQL($name, Index $index)
2357
    {
2358
        $columns = $index->getQuotedColumns($this);
2359
        $name = new Identifier($name);
2360
2361
        if (count($columns) === 0) {
2362
            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2363
        }
2364
2365
        return 'CONSTRAINT ' . $name->getQuotedName($this) . ' UNIQUE ('
2366
             . $this->getIndexFieldDeclarationListSQL($columns)
2367
             . ')' . $this->getPartialIndexSQL($index);
2368
    }
2369
2370
    /**
2371
     * Obtains DBMS specific SQL code portion needed to set an index
@@ 2381-2393 (lines=13) @@
2378
     *
2379
     * @throws \InvalidArgumentException
2380
     */
2381
    public function getIndexDeclarationSQL($name, Index $index)
2382
    {
2383
        $columns = $index->getQuotedColumns($this);
2384
        $name = new Identifier($name);
2385
2386
        if (count($columns) === 0) {
2387
            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2388
        }
2389
2390
        return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name->getQuotedName($this) . ' ('
2391
            . $this->getIndexFieldDeclarationListSQL($columns)
2392
            . ')' . $this->getPartialIndexSQL($index);
2393
    }
2394
2395
    /**
2396
     * Obtains SQL code portion needed to create a custom column,