Code Duplication    Length = 5-5 lines in 2 locations

Core/StorageHandler/Database/Migration.php 2 locations

@@ 204-208 (lines=5) @@
201
            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found");
202
        }
203
204
        if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) {
205
            // commit to release the lock
206
            $conn->commit();
207
            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not executing");
208
        }
209
210
        $conn->update(
211
            $this->tableName,
@@ 364-368 (lines=5) @@
361
        // migration exists
362
363
        // fail if it was not suspended
364
        if ($existingMigrationData['status'] != APIMigration::STATUS_SUSPENDED) {
365
            // commit to release the lock
366
            $conn->commit();
367
            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not suspended");
368
        }
369
370
        $migration = new APIMigration(
371
            $migration->name,