Code Duplication    Length = 10-10 lines in 2 locations

code/control/DeployForm.php 2 locations

@@ 89-98 (lines=10) @@
86
	protected function buildCommitSelector($project) {
87
		// Branches
88
		$branches = [];
89
		foreach ($project->DNBranchList() as $branch) {
90
			$sha = $branch->SHA();
91
			$name = $branch->Name();
92
			$branchValue = sprintf("%s (%s, %s old)",
93
				$name,
94
				substr($sha, 0, 8),
95
				$branch->LastUpdated()->TimeDiff()
96
			);
97
			$branches[$sha . '-' . $name] = $branchValue;
98
		}
99
100
		// Tags
101
		$tags = [];
@@ 102-111 (lines=10) @@
99
100
		// Tags
101
		$tags = [];
102
		foreach ($project->DNTagList()->setLimit(null) as $tag) {
103
			$sha = $tag->SHA();
104
			$name = $tag->Name();
105
			$tagValue = sprintf("%s (%s, %s old)",
106
				$name,
107
				substr($sha, 0, 8),
108
				$branch->LastUpdated()->TimeDiff()
109
			);
110
			$tags[$sha . '-' . $name] = $tagValue;
111
		}
112
		$tags = array_reverse($tags);
113
114
		// Past deployments