Code Duplication    Length = 10-13 lines in 2 locations

code/control/DeployDispatcher.php 2 locations

@@ 74-86 (lines=13) @@
71
	 * @param \SS_HTTPRequest $request
72
	 * @return \SS_HTTPResponse
73
	 */
74
	public function history(\SS_HTTPRequest $request) {
75
		$data = [];
76
77
		$list = $this->environment->DeployHistory('DeployStarted');
78
79
		foreach ($list as $deployment) {
80
			$data[] = $this->formatter->getDeploymentData($deployment);
81
		}
82
83
		return $this->getAPIResponse([
84
			'list' => $data,
85
		], 200);
86
	}
87
88
	/**
89
	 * @param \SS_HTTPRequest $request
@@ 92-101 (lines=10) @@
89
	 * @param \SS_HTTPRequest $request
90
	 * @return \SS_HTTPResponse
91
	 */
92
	public function upcoming(\SS_HTTPRequest $request) {
93
		$data = [];
94
		$list = $this->environment->UpcomingDeployments();
95
		foreach ($list as $deployment) {
96
			$data[] = $this->formatter->getDeploymentData($deployment);
97
		}
98
		return $this->getAPIResponse([
99
			'list' => $data,
100
		], 200);
101
	}
102
103
	/**
104
	 * @param \SS_HTTPRequest $request