Code Duplication    Length = 8-11 lines in 2 locations

src/Commands/SetAutoIncrementCommand.php 2 locations

@@ 120-127 (lines=8) @@
117
     * @param  Collection $tables
118
     * @return void
119
     */
120
    protected function updateMysqlTables(Collection $tables): void
121
    {
122
        $tables->filter(function ($table) {
123
            return $this->getAutoIncrement('Mysql', $table) < $this->autoIncrement;
124
        })->map(function ($table) {
125
            $this->updateAutoIncrement('Mysql', $table);
126
        });
127
    }
128
129
    /**
130
     * Update AUTO INCREMENT value in sqlite tables.
@@ 135-145 (lines=11) @@
132
     * @param  Collection $tables
133
     * @return void
134
     */
135
    protected function updateSqliteTables(Collection $tables): void
136
    {
137
        // the auto increment value is reduced by 1 as SQLITE uses it in this way
138
        $this->autoIncrement--;
139
140
        $tables->filter(function ($table) {
141
            return $this->getAutoIncrement('Sqlite', $table) < $this->autoIncrement;
142
        })->map(function ($table) {
143
            $this->updateAutoIncrement('Sqlite', $table);
144
        });
145
    }
146
}
147