MaintenanceModeNotEnabled   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 35
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A name() 0 4 1
A check() 0 4 1
A message() 0 4 1
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis\Checks;
4
5
class MaintenanceModeNotEnabled implements Check
6
{
7
    /**
8
     * The name of the check.
9
     *
10
     * @param array $config
11
     * @return string
12
     */
13
    public function name(array $config): string
14
    {
15
        return trans('self-diagnosis::checks.maintenance_mode_not_enabled.name');
16
    }
17
18
    /**
19
     * Perform the actual verification of this check.
20
     *
21
     * @param array $config
22
     * @return bool
23
     */
24
    public function check(array $config): bool
25
    {
26
        return app()->isDownForMaintenance() === false;
27
    }
28
29
    /**
30
     * The error message to display in case the check does not pass.
31
     *
32
     * @param array $config
33
     * @return string
34
     */
35
    public function message(array $config): string
36
    {
37
        return trans('self-diagnosis::checks.maintenance_mode_not_enabled.message');
38
    }
39
}
40