Code Duplication    Length = 14-15 lines in 2 locations

Migration/MigrationExecutorWithNameGenerator.php 2 locations

@@ 58-71 (lines=14) @@
55
    /**
56
     * {@inheritdoc}
57
     */
58
    protected function checkTableName($tableName, Migration $migration)
59
    {
60
        parent::checkTableName($tableName, $migration);
61
        if (strlen($tableName) > $this->nameGenerator->getMaxIdentifierSize()) {
62
            throw new InvalidNameException(
63
                sprintf(
64
                    'Max table name length is %s. Please correct "%s" table in "%s" migration',
65
                    $this->nameGenerator->getMaxIdentifierSize(),
66
                    $tableName,
67
                    get_class($migration)
68
                )
69
            );
70
        }
71
    }
72
73
    /**
74
     * {@inheritdoc}
@@ 76-90 (lines=15) @@
73
    /**
74
     * {@inheritdoc}
75
     */
76
    protected function checkColumnName($tableName, $columnName, Migration $migration)
77
    {
78
        parent::checkColumnName($tableName, $columnName, $migration);
79
        if (strlen($columnName) > $this->nameGenerator->getMaxIdentifierSize()) {
80
            throw new InvalidNameException(
81
                sprintf(
82
                    'Max column name length is %s. Please correct "%s:%s" column in "%s" migration',
83
                    $this->nameGenerator->getMaxIdentifierSize(),
84
                    $tableName,
85
                    $columnName,
86
                    get_class($migration)
87
                )
88
            );
89
        }
90
    }
91
}
92