Code Duplication    Length = 5-5 lines in 3 locations

Core/StorageHandler/Database/Migration.php 3 locations

@@ 284-288 (lines=5) @@
281
            // migration exists
282
283
            // fail if it was already executing or already done
284
            if ($existingMigrationData['status'] == APIMigration::STATUS_STARTED) {
285
                // commit to release the lock
286
                $conn->commit();
287
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing");
288
            }
289
            if ($existingMigrationData['status'] == APIMigration::STATUS_DONE) {
290
                // commit to release the lock
291
                $conn->commit();
@@ 289-293 (lines=5) @@
286
                $conn->commit();
287
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing");
288
            }
289
            if ($existingMigrationData['status'] == APIMigration::STATUS_DONE) {
290
                // commit to release the lock
291
                $conn->commit();
292
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed");
293
            }
294
            if ($existingMigrationData['status'] == APIMigration::STATUS_SKIPPED) {
295
                // commit to release the lock
296
                $conn->commit();
@@ 294-298 (lines=5) @@
291
                $conn->commit();
292
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed");
293
            }
294
            if ($existingMigrationData['status'] == APIMigration::STATUS_SKIPPED) {
295
                // commit to release the lock
296
                $conn->commit();
297
                throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already skipped");
298
            }
299
300
            // do not set migration start date if we are skipping it
301
            $migration = new APIMigration(