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 { |
||
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) { |
||
0 ignored issues
–
show
|
|||
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 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.