Code Duplication    Length = 7-7 lines in 2 locations

code/control/GitDispatcher.php 1 location

@@ 261-267 (lines=7) @@
258
	 */
259
	protected function getGitTags($project) {
260
		$tags = [];
261
		foreach ($project->DNTagList()->setLimit(null) as $tag) {
262
			$tags[] = [
263
				'id' => $tag->SHA(),
264
				'ref_name' => $tag->Name(),
265
				'title' => $tag->Name()
266
			];
267
		}
268
		return $tags;
269
	}
270

code/control/DNRoot.php 1 location

@@ 1129-1135 (lines=7) @@
1126
			'options' => $options
1127
		];
1128
1129
		foreach ($project->DNTagList()->setLimit(null) as $tag) {
1130
			$name = $tag->Name();
1131
			$data['field_data'][] = [
1132
				'id' => $tag->SHA(),
1133
				'text' => sprintf("%s", $name)
1134
			];
1135
		}
1136
1137
		// show newest tags first.
1138
		$data['field_data'] = array_reverse($data['field_data']);