Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 2339-2351 (lines=13) @@
2336
     *
2337
     * @throws \InvalidArgumentException
2338
     */
2339
    public function getUniqueConstraintDeclarationSQL($name, Index $index)
2340
    {
2341
        $columns = $index->getQuotedColumns($this);
2342
        $name = new Identifier($name);
2343
2344
        if (count($columns) === 0) {
2345
            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2346
        }
2347
2348
        return 'CONSTRAINT ' . $name->getQuotedName($this) . ' UNIQUE ('
2349
             . $this->getIndexFieldDeclarationListSQL($columns)
2350
             . ')' . $this->getPartialIndexSQL($index);
2351
    }
2352
2353
    /**
2354
     * Obtains DBMS specific SQL code portion needed to set an index
@@ 2364-2376 (lines=13) @@
2361
     *
2362
     * @throws \InvalidArgumentException
2363
     */
2364
    public function getIndexDeclarationSQL($name, Index $index)
2365
    {
2366
        $columns = $index->getQuotedColumns($this);
2367
        $name = new Identifier($name);
2368
2369
        if (count($columns) === 0) {
2370
            throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2371
        }
2372
2373
        return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name->getQuotedName($this) . ' ('
2374
            . $this->getIndexFieldDeclarationListSQL($columns)
2375
            . ')' . $this->getPartialIndexSQL($index);
2376
    }
2377
2378
    /**
2379
     * Obtains SQL code portion needed to create a custom column,