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

DevHealthController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 9 1
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