Code Duplication    Length = 10-10 lines in 2 locations

code/control/DeployForm.php 2 locations

@@ 68-77 (lines=10) @@
65
	protected function buildCommitSelector($project) {
66
		// Branches
67
		$branches = array();
68
		foreach($project->DNBranchList() as $branch) {
69
			$sha = $branch->SHA();
70
			$name = $branch->Name();
71
			$branchValue = sprintf("%s (%s, %s old)",
72
				$name,
73
				substr($sha, 0, 8),
74
				$branch->LastUpdated()->TimeDiff()
75
			);
76
			$branches[$sha . '-' . $name] = $branchValue;
77
		}
78
79
		// Tags
80
		$tags = array();
@@ 81-90 (lines=10) @@
78
79
		// Tags
80
		$tags = array();
81
		foreach($project->DNTagList()->setLimit(null) as $tag) {
82
			$sha = $tag->SHA();
83
			$name = $tag->Name();
84
			$tagValue = sprintf("%s (%s, %s old)",
85
				$name,
86
				substr($sha, 0, 8),
87
				$branch->LastUpdated()->TimeDiff()
88
			);
89
			$tags[$sha . '-' . $tag] = $tagValue;
90
		}
91
		$tags = array_reverse($tags);
92
93
		// Past deployments