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 DevHealthController extends Controller { |
||
4 | /** |
||
5 | * @var array |
||
6 | */ |
||
7 | public static $allowed_actions = array( |
||
8 | 'index' |
||
9 | ); |
||
10 | |||
11 | /** |
||
12 | * @return EnvironmentChecker |
||
13 | * |
||
14 | * @throws SS_HTTPResponse_Exception |
||
15 | */ |
||
16 | function index() { |
||
0 ignored issues
–
show
|
|||
17 | // health check does not require permission to run |
||
18 | |||
19 | $checker = new EnvironmentChecker('health', 'Site health'); |
||
20 | $checker->init(''); |
||
21 | $checker->setErrorCode(404); |
||
22 | |||
23 | return $checker; |
||
24 | } |
||
25 | } |
||
26 |
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.