Code Duplication    Length = 13-13 lines in 2 locations

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

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