Code Duplication    Length = 9-15 lines in 4 locations

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/EnvironmentOverview.php 1 location

@@ 27-35 (lines=9) @@
24
		'deployment'
25
	];
26
27
	public function init() {
28
		parent::init();
29
		$this->project = $this->getCurrentProject();
30
		if (!$this->project) {
31
			return $this->project404Response();
32
		}
33
		// Performs canView permission check by limiting visible projects
34
		$this->environment = $this->getCurrentEnvironment($this->project);
35
	}
36
37
	/**
38
	 *

code/control/DeployDispatcher.php 1 location

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

code/control/ApprovalsDispatcher.php 1 location

@@ 43-56 (lines=14) @@
40
	 */
41
	private static $_cache_project_members = null;
42
43
	public function init() {
44
		parent::init();
45
46
		$this->project = $this->getCurrentProject();
47
		if (!$this->project) {
48
			return $this->project404Response();
49
		}
50
51
		// Performs canView permission check by limiting visible projects
52
		$this->environment = $this->getCurrentEnvironment($this->project);
53
		if (!$this->environment) {
54
			return $this->environment404Response();
55
		}
56
	}
57
58
	/**
59
	 * @param \SS_HTTPRequest $request