Code Duplication    Length = 13-13 lines in 2 locations

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

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