Completed
Branch master (9dcfc4)
by Daniel
24:32
created

DevHealthController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace SilverStripe\EnvironmentCheck\Controllers;
4
5
use SilverStripe\Control\Controller;
6
use SilverStripe\EnvironmentCheck\EnvironmentChecker;
7
8
/**
9
 * Class DevHealthController
10
 *
11
 * @package environmentcheck
12
 */
13
class DevHealthController extends Controller
14
{
15
    /**
16
     * @var array
17
     */
18
    private static $allowed_actions = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $allowed_actions is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
19
        'index'
20
    ];
21
22
    /**
23
     * @return EnvironmentChecker
24
     *
25
     * @throws HTTPResponse_Exception
26
     */
27
    public function index()
28
    {
29
        // health check does not require permission to run
30
31
        $checker = new EnvironmentChecker('health', 'Site health');
32
        $checker->setErrorCode(500);
33
34
        return $checker;
35
    }
36
}
37