Code Duplication    Length = 11-12 lines in 2 locations

Migration/Schema/TableWithNameGenerator.php 2 locations

@@ 27-37 (lines=11) @@
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function addIndex(array $columnNames, $indexName = null, array $flags = [], array $options = [])
28
    {
29
        if (!$indexName) {
30
            $indexName = $this->nameGenerator->generateIndexName(
31
                $this->getName(),
32
                $columnNames
33
            );
34
        }
35
36
        return parent::addIndex($columnNames, $indexName, $flags, $options);
37
    }
38
39
    /**
40
     * {@inheritdoc}
@@ 42-53 (lines=12) @@
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function addUniqueIndex(array $columnNames, $indexName = null, array $options = [])
43
    {
44
        if (!$indexName) {
45
            $indexName = $this->nameGenerator->generateIndexName(
46
                $this->getName(),
47
                $columnNames,
48
                true
49
            );
50
        }
51
52
        return parent::addUniqueIndex($columnNames, $indexName, $options);
53
    }
54
55
    /**
56
     * {@inheritdoc}