Code Duplication    Length = 5-5 lines in 2 locations

Core/StorageHandler/Database/Migration.php 2 locations

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