Code Duplication    Length = 10-13 lines in 2 locations

code/control/DeployDispatcher.php 2 locations

@@ 83-95 (lines=13) @@
80
	 * @param \SS_HTTPRequest $request
81
	 * @return \SS_HTTPResponse
82
	 */
83
	public function history(SS_HTTPRequest $request) {
84
		$data = [];
85
86
		$list = $this->environment->DeployHistory('DeployStarted');
87
88
		foreach ($list as $deployment) {
89
			$data[] = $this->getDeploymentData($deployment);
90
		}
91
92
		return $this->getAPIResponse([
93
			'list' => $data,
94
		], 200);
95
	}
96
97
	/**
98
	 * @param \SS_HTTPRequest $request
@@ 101-110 (lines=10) @@
98
	 * @param \SS_HTTPRequest $request
99
	 * @return \SS_HTTPResponse
100
	 */
101
	public function upcoming(SS_HTTPRequest $request) {
102
		$data = [];
103
		$list = $this->environment->UpcomingDeployments();
104
		foreach ($list as $deployment) {
105
			$data[] = $this->getDeploymentData($deployment);
106
		}
107
		return $this->getAPIResponse([
108
			'list' => $data,
109
		], 200);
110
	}
111
112
	/**
113
	 * @param \SS_HTTPRequest $request