Completed
Push — master ( e090e4...18d79e )
by Damian
02:26
created

code/DevCheckController.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
class DevCheckController extends Controller {
0 ignored issues
show
As per PSR2, the opening brace for this class should be on a new line.
Loading history...
4
	/**
5
	 * @var array
6
	 */
7
	public static $allowed_actions = array(
8
		'index'
9
	);
10
11
	/**
12
	 * Permission code to check for access to this controller.
13
	 *
14
	 * @var string
15
	 */
16
	private static $permission = 'ADMIN';
17
18
	/**
19
	 * @param SS_HTTPRequest $request
20
	 *
21
	 * @return EnvironmentChecker
22
	 *
23
	 * @throws SS_HTTPResponse_Exception
24
	 */
25
	function index($request) {
26
		$suite = 'check';
27
28
		if ($name = $request->param('Suite')) {
29
			$suite = $name;
30
		}
31
32
		$checker = new EnvironmentChecker($suite, 'Environment status');
33
		$checker->init($this->config()->permission);
34
35
		return $checker;
36
	}
37
}
38