Code Duplication    Length = 9-9 lines in 2 locations

code/model/DNDataArchive.php 2 locations

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