Code Duplication    Length = 9-15 lines in 3 locations

code/control/EnvironmentOverview.php 1 location

@@ 19-27 (lines=9) @@
16
		self::ACTION_OVERVIEW
17
	];
18
19
	public function init() {
20
		parent::init();
21
		$this->project = $this->getCurrentProject();
22
		if (!$this->project) {
23
			return $this->project404Response();
24
		}
25
		// Performs canView permission check by limiting visible projects
26
		$this->environment = $this->getCurrentEnvironment($this->project);
27
	}
28
29
	/**
30
	 *

code/control/PlanDispatcher.php 1 location

@@ 35-49 (lines=15) @@
32
		self::ACTION_PLAN
33
	];
34
35
	public function init() {
36
		parent::init();
37
38
		$this->project = $this->getCurrentProject();
39
40
		if (!$this->project) {
41
			return $this->project404Response();
42
		}
43
44
		// Performs canView permission check by limiting visible projects
45
		$this->environment = $this->getCurrentEnvironment($this->project);
46
		if (!$this->environment) {
47
			return $this->environment404Response();
48
		}
49
	}
50
51
	/**
52
	 *

code/control/DeployDispatcher.php 1 location

@@ 56-70 (lines=15) @@
53
	 */
54
	private static $_cache_current_build = null;
55
56
	public function init() {
57
		parent::init();
58
59
		$this->project = $this->getCurrentProject();
60
61
		if (!$this->project) {
62
			return $this->project404Response();
63
		}
64
65
		// Performs canView permission check by limiting visible projects
66
		$this->environment = $this->getCurrentEnvironment($this->project);
67
		if (!$this->environment) {
68
			return $this->environment404Response();
69
		}
70
	}
71
72
	/**
73
	 * @param \SS_HTTPRequest $request