Code Duplication    Length = 5-5 lines in 2 locations

Core/StorageHandler/Database/Migration.php 2 locations

@@ 198-202 (lines=5) @@
195
196
        // fail if it was not executing
197
198
        if (!is_array($existingMigrationData)) {
199
            // commit to release the lock
200
            $conn->commit();
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
@@ 355-359 (lines=5) @@
352
        $stmt = $conn->executeQuery($sql, array($migration->name));
353
        $existingMigrationData = $stmt->fetch(\PDO::FETCH_ASSOC);
354
355
        if (!is_array($existingMigrationData)) {
356
            // commit immediately, to release the lock and avoid deadlocks
357
            $conn->commit();
358
            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found");
359
        }
360
361
        // migration exists
362