Code Duplication    Length = 10-13 lines in 3 locations

Ubiquity/utils/git/UGitRepository.php 3 locations

@@ 88-97 (lines=10) @@
85
		}
86
	}
87
	
88
	public function getChangesInFile($filename){
89
		try{
90
			$output=$this->extractFromCommand('git diff '.$filename);
91
			if(is_array($output))
92
				return implode('\r\n', $output);
93
			return $output;
94
		}catch (\Cz\Git\GitException $e){
95
			return "";
96
		}
97
	}
98
	
99
	public function getChangesInCommit($commitHash){
100
		try{
@@ 99-108 (lines=10) @@
96
		}
97
	}
98
	
99
	public function getChangesInCommit($commitHash){
100
		try{
101
			$output=$this->extractFromCommand("git show {$commitHash}");
102
			if(is_array($output))
103
				return implode('\r\n', $output);
104
				return $output;
105
		}catch (\Cz\Git\GitException $e){
106
			return "";
107
		}
108
	}
109
	
110
	/**
111
	 * Returns the remote URL
@@ 114-126 (lines=13) @@
111
	 * Returns the remote URL
112
	 * @return string
113
	 */
114
	public function getRemoteUrl(){
115
		try{
116
			$values= $this->extractFromCommand('git config --get remote.origin.url',function($str){
117
				return trim($str);
118
			});
119
			if(isset($values)){
120
				return implode(" ", $values);
121
			}
122
		}catch (\Cz\Git\GitException $e){
123
			return "";
124
		}
125
		return "";
126
	}
127
	
128
	/**
129
	 * Ignore file(s).