Code Duplication    Length = 11-12 lines in 2 locations

code/model/jobs/DNDeployment.php 2 locations

@@ 175-186 (lines=12) @@
172
	 *
173
	 * @return \Gitonomy\Git\Commit|null
174
	 */
175
	public function getCommit() {
176
		$repo = $this->getRepository();
177
		if($repo) {
178
			try {
179
				return $this->Environment()->getCommit($this->SHA);
180
			} catch(Gitonomy\Git\Exception\ReferenceNotFoundException $ex) {
181
				return null;
182
			}
183
		}
184
185
		return null;
186
	}
187
188
	/**
189
	 * Get the commit URL to the commit associated with this deployment.
@@ 213-223 (lines=11) @@
210
	 *
211
	 * @return string|null
212
	 */
213
	public function getCommitMessage() {
214
		$commit = $this->getCommit();
215
		if($commit) {
216
			try {
217
				return Convert::raw2xml($this->Environment()->getCommitMessage($commit));
218
			} catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) {
219
				return null;
220
			}
221
		}
222
		return null;
223
	}
224
225
	/**
226
	 * Return all tags for the deployed commit.