Code Duplication    Length = 5-5 lines in 3 locations

Core/StorageHandler/Database.php 3 locations

@@ 254-258 (lines=5) @@
251
            // migration exists
252
253
            // fail if it was already executing or already done
254
            if ($existingMigrationData['status'] == Migration::STATUS_STARTED) {
255
                // commit to release the lock
256
                $conn->commit();
257
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing");
258
            }
259
            if ($existingMigrationData['status'] == Migration::STATUS_DONE) {
260
                // commit to release the lock
261
                $conn->commit();
@@ 259-263 (lines=5) @@
256
                $conn->commit();
257
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing");
258
            }
259
            if ($existingMigrationData['status'] == Migration::STATUS_DONE) {
260
                // commit to release the lock
261
                $conn->commit();
262
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed");
263
            }
264
            if ($existingMigrationData['status'] == Migration::STATUS_SKIPPED) {
265
                // commit to release the lock
266
                $conn->commit();
@@ 264-268 (lines=5) @@
261
                $conn->commit();
262
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed");
263
            }
264
            if ($existingMigrationData['status'] == Migration::STATUS_SKIPPED) {
265
                // commit to release the lock
266
                $conn->commit();
267
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already skipped");
268
            }
269
270
            // do not set migration start date if we are skipping it
271
            $migration = new Migration(