Code Duplication    Length = 9-9 lines in 2 locations

code/model/DNDataArchive.php 2 locations

@@ 434-442 (lines=9) @@
431
		}
432
433
		// Extract database.sql.gz to <workingdir>/database.sql
434
		if(file_exists($workingDir . DIRECTORY_SEPARATOR . 'database.sql.gz')) {
435
			$process = new AbortableProcess('gunzip database.sql.gz', $workingDir);
436
			$process->setTimeout(3600);
437
			$process->run();
438
			if(!$process->isSuccessful()) {
439
				$cleanupFn();
440
				throw new RuntimeException(sprintf('Could not extract the db archive: %s', $process->getErrorOutput()));
441
			}
442
		}
443
444
		// Extract assets.tar.gz to <workingdir>/assets/
445
		if(file_exists($workingDir . DIRECTORY_SEPARATOR . 'assets.tar.gz')) {
@@ 445-453 (lines=9) @@
442
		}
443
444
		// Extract assets.tar.gz to <workingdir>/assets/
445
		if(file_exists($workingDir . DIRECTORY_SEPARATOR . 'assets.tar.gz')) {
446
			$process = new AbortableProcess('tar xzf assets.tar.gz', $workingDir);
447
			$process->setTimeout(3600);
448
			$process->run();
449
			if(!$process->isSuccessful()) {
450
				$cleanupFn();
451
				throw new RuntimeException(sprintf('Could not extract the assets archive: %s', $process->getErrorOutput()));
452
			}
453
		}
454
455
		return true;
456
	}