Code Duplication    Length = 7-7 lines in 2 locations

src/Utils/BzipExtractor.php 1 location

@@ 44-50 (lines=7) @@
41
		return $this->extractArchive();
42
	}
43
44
	private function extractShell(){
45
		$command = 'tar -jxvf  ' . ProcessUtils::escapeArgument($this->file) . ' -C ' . ProcessUtils::escapeArgument($this->path) . ' && chmod -R u+w ' . ProcessUtils::escapeArgument($this->path);
46
		$process = new Process($command);
47
		$process->run();
48
		echo $process->getErrorOutput();
49
		return $process->isSuccessful();
50
	}
51
52
	private function extractArchive(){
53
		throw new \RuntimeException("Could not decompress the archive, GNU tar is missing or shell_exec is disabled.");

src/Utils/ZipExtractor.php 1 location

@@ 48-54 (lines=7) @@
45
		return $this->extractZipArchive();
46
	}
47
48
	private function extractShell(){
49
		$command = 'unzip ' . ProcessUtils::escapeArgument($this->file) . ' -d ' . ProcessUtils::escapeArgument($this->path) . ' && chmod -R u+w ' . ProcessUtils::escapeArgument($this->path);
50
		$process = new Process($command);
51
		$process->run();
52
		echo $process->getErrorOutput();
53
		return $process->isSuccessful();
54
	}
55
56
	private function extractZipArchive(){
57
		$zipArchive = new ZipArchive();