Code Duplication    Length = 17-17 lines in 2 locations

code/model/jobs/DNCreateEnvironment.php 1 location

@@ 109-125 (lines=17) @@
106
	 *
107
	 * @return string
108
	 */
109
	public function ResqueStatus() {
110
		$status = new Resque_Job_Status($this->ResqueToken);
111
		$statusCode = $status->get();
112
		// The Resque job can no longer be found, fallback to the DNDeployment.Status
113
		if($statusCode === false) {
114
			// Translate from the DNDeployment.Status to the Resque job status for UI purposes
115
			switch($this->Status) {
116
				case 'Finished':
117
					return 'Complete';
118
				case 'Started':
119
					return 'Running';
120
				default:
121
					return $this->Status;
122
			}
123
		}
124
		return self::map_resque_status($statusCode);
125
	}
126
127
	/**
128
	 * Start a resque job for this creation.

code/model/jobs/DNDataTransfer.php 1 location

@@ 259-275 (lines=17) @@
256
	 *
257
	 * @return string
258
	 */
259
	public function ResqueStatus() {
260
		$status = new Resque_Job_Status($this->ResqueToken);
261
		$statusCode = $status->get();
262
		// The Resque job can no longer be found, fallback to the DNDataTransfer.Status
263
		if($statusCode === false) {
264
			// Translate from the DNDataTransfer.Status to the Resque job status for UI purposes
265
			switch($this->Status) {
266
				case 'Finished':
267
					return 'Complete';
268
				case 'Started':
269
					return 'Running';
270
				default:
271
					return $this->Status;
272
			}
273
		}
274
		return self::map_resque_status($statusCode);
275
	}
276
277
}
278