Code Duplication    Length = 10-10 lines in 2 locations

code/control/DeployForm.php 2 locations

@@ 210-219 (lines=10) @@
207
	protected function buildCommitSelector($project, $pipelineCommits = null) {
208
		// Branches
209
		$branches = array();
210
		foreach($project->DNBranchList() as $branch) {
211
			$sha = $branch->SHA();
212
			$name = $branch->Name();
213
			$branchValue = sprintf("%s (%s, %s old)",
214
				$name,
215
				substr($sha, 0, 8),
216
				$branch->LastUpdated()->TimeDiff()
217
			);
218
			$branches[$sha . '-' . $name] = $branchValue;
219
		}
220
221
		// Tags
222
		$tags = array();
@@ 223-232 (lines=10) @@
220
221
		// Tags
222
		$tags = array();
223
		foreach($project->DNTagList()->setLimit(null) as $tag) {
224
			$sha = $tag->SHA();
225
			$name = $tag->Name();
226
			$tagValue = sprintf("%s (%s, %s old)",
227
				$name,
228
				substr($sha, 0, 8),
229
				$branch->LastUpdated()->TimeDiff()
230
			);
231
			$tags[$sha . '-' . $tag] = $tagValue;
232
		}
233
		$tags = array_reverse($tags);
234
235
		// Past deployments